/* ---- Order tracker ---- */
.tracker { margin: 18px 0; }
.tracker-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.track { list-style: none; margin: 0; padding: 0; position: relative; }
.track-step { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding-bottom: 26px; position: relative; }
.track-step:last-child { padding-bottom: 0; }
.track-step::before { content: ''; position: absolute; left: 19px; top: 40px; bottom: 0; width: 2px; background: #dfe6ea; }
.track-step:last-child::before { display: none; }
.track-step.is-done::before { background: var(--ok); }
.track-dot { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #eef2f4; color: #6b7a86; border: 2px solid #dfe6ea; }
.track-dot svg { width: 18px; height: 18px; }
.track-dot i { width: 10px; height: 10px; border-radius: 50%; background: currentColor; opacity: .4; }
.is-done .track-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.is-current .track-dot { border-color: var(--accent); color: var(--accent); animation: trackPulse 1.8s ease-out infinite; }
.is-current .track-dot i { opacity: 1; }
@keyframes trackPulse { 0% { box-shadow: 0 0 0 0 rgba(214,165,72,.45); } 100% { box-shadow: 0 0 0 16px rgba(214,165,72,0); } }
.track-step strong { display: block; font-size: 1.02rem; }
.track-phase { display: block; font-size: .7rem; letter-spacing: .09em; text-transform: uppercase; color: #6b7a86; font-weight: 700; }
.track-live { display: inline-block; margin-top: 6px; padding: 4px 10px; border-radius: 99px; background: var(--accent-50); color: var(--accent-700); font-weight: 700; font-size: .78rem; }
.track-call { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--ok); font-weight: 700; }
.track-call svg { width: 14px; height: 14px; }
@media (prefers-reduced-motion: reduce) { .is-current .track-dot { animation: none; } }

/* ---- Account + driver portals ---- */
.portal-tabs { display: flex; gap: 6px; background: #eef2f4; padding: 5px; border-radius: 99px; width: fit-content; margin: 0 0 22px; }
.portal-tabs button { border: 0; background: transparent; padding: 9px 18px; border-radius: 99px; font-weight: 700; cursor: pointer; color: #52606b; position: relative; transition: color .2s; }
.portal-tabs button.is-on { color: #fff; }
.portal-tabs .pt-ink { position: absolute; inset: 5px auto 5px 5px; border-radius: 99px; background: #0f2a3a; z-index: 0; pointer-events: none; }
.portal-tabs button span { position: relative; z-index: 1; }
.job { display: grid; gap: 14px; padding: 18px; }
.job-top { display: flex; gap: 14px; align-items: center; }
.job-top img, .job-top .car-ph { width: 92px; height: 60px; object-fit: cover; border-radius: 12px; background: #eef2f4; }
.job-meta { display: grid; gap: 4px; }
.job-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.job-steps { display: flex; gap: 6px; }
.job-steps i { flex: 1; height: 6px; border-radius: 9px; background: #e4eaee; overflow: hidden; position: relative; }
.job-steps i.on::after { content: ''; position: absolute; inset: 0; background: var(--ok); }
.driver-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 20px; margin-bottom: 18px; }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 640px) { .profile-grid { grid-template-columns: 1fr; } .job-top img, .job-top .car-ph { width: 72px; height: 50px; } }

/* ---- Motion polish ---- */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--accent); z-index: 200; pointer-events: none; }
.tilt { transform-style: preserve-3d; will-change: transform; }
.car-go.car-book { width: auto; height: 42px; padding: 0 16px 0 18px; border-radius: 99px; gap: 8px; grid-auto-flow: column; font-weight: 800; font-size: .9rem; }
.car-go.car-book svg { width: 16px; height: 16px; }
.car-card { transform-style: preserve-3d; }

/* ---- Portal shell: logged-in customers and drivers enter a separate app-like space ---- */
body.portal-mode #site-header,
body.portal-mode #site-footer,
body.admin-mode #site-header,
body.admin-mode #site-footer,
body.admin-mode #bottom-nav,
body.kiosk-mode #site-header,
body.kiosk-mode #site-footer,
body.kiosk-mode #bottom-nav,
body.portal-guest #portal-top,
body.portal-guest #portal-nav { display: none !important; }
body.portal-guest #view { margin-left: 0 !important; }
body.portal-guest .page-pad,
body.portal-guest .results,
body.portal-guest .car-page,
body.portal-guest .checkout,
body.portal-guest .booking-page { padding-top: 24px !important; }
#portal-nav, #portal-top { display: none; }
body.portal-mode { --header-h: 68px; --pn-w: 264px; background: #f1f4f6; }
body.portal-mode #portal-top { display: flex; position: fixed; top: 0; right: 0; left: 0; height: var(--header-h); z-index: 60; align-items: center; justify-content: space-between; padding: 0 clamp(16px, 3vw, 36px); background: rgba(241, 244, 246, .86); backdrop-filter: blur(14px); border-bottom: 1px solid #e0e6ea; }
body.portal-mode #portal-top[hidden], body.portal-mode #portal-nav[hidden] { display: none; }
.pt-title { display: grid; line-height: 1.15; }
.pt-title strong { font-size: 1.15rem; }
.pt-eyebrow { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 800; color: var(--ok); }
.pt-user { display: flex; align-items: center; gap: 12px; }
.pt-name { font-weight: 700; font-size: .92rem; }
body.portal-mode #view { min-height: 100vh; }
body.portal-mode #bottom-nav a, body.portal-mode #bottom-nav button { }
#bottom-nav button { display: grid; place-items: center; align-content: center; gap: 3px; color: rgba(255,255,255,.62); font: inherit; font-size: .68rem; font-weight: 700; background: transparent; border: 0; border-radius: 20px; cursor: pointer; }
#bottom-nav button svg { width: 22px; height: 22px; }
@media (max-width: 899px) { #portal-nav { display: none !important; } .pt-name { display: none; } }
@media (min-width: 900px) {
  body.portal-mode #portal-top { left: var(--pn-w); }
  body.portal-mode #view { margin-left: var(--pn-w); }
  body.portal-mode .bottom-nav { display: none !important; }
  body.portal-mode #portal-nav { display: flex; position: fixed; inset: 0 auto 0 0; width: var(--pn-w); flex-direction: column; z-index: 70; padding: 22px 16px; background: linear-gradient(180deg, #0b1f2e 0%, #0e2a3a 60%, #0b3a3a 100%); color: #fff; overflow: hidden; }
  #portal-nav::after { content: ''; position: absolute; width: 320px; height: 320px; right: -160px; bottom: -120px; border-radius: 50%; background: radial-gradient(circle, rgba(255,122,47,.35), transparent 65%); pointer-events: none; }
  .pn-brand { display: grid; gap: 10px; padding: 4px 8px 22px; }
  .pn-brand .logo { color: #fff; }
  .pn-tag { width: fit-content; font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 5px 10px; border-radius: 99px; background: rgba(255,255,255,.1); color: #7fe3d4; }
  .pn-menu { display: grid; gap: 4px; position: relative; z-index: 1; }
  .pn-menu a, .pn-foot a, .pn-foot button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; color: rgba(255,255,255,.72); font-weight: 700; font-size: .95rem; border: 0; background: transparent; cursor: pointer; font-family: inherit; text-align: left; width: 100%; transition: background .25s, color .25s, transform .25s; }
  .pn-menu a svg, .pn-foot svg { width: 20px; height: 20px; flex: none; }
  .pn-menu a:hover, .pn-foot a:hover, .pn-foot button:hover { background: rgba(255,255,255,.08); color: #fff; transform: translateX(3px); }
  .pn-menu a[aria-current='page'] { background: var(--accent); color: #fff; box-shadow: 0 10px 24px -10px rgba(255,122,47,.8); }
  .pn-foot { margin-top: auto; display: grid; gap: 4px; position: relative; z-index: 1; border-top: 1px solid rgba(255,255,255,.1); padding-top: 14px; }
  .pn-foot a svg { transform: rotate(180deg); }
}

/* ---- Mobile-first polish inside the portals ---- */
body.portal-mode .page-pad { padding-top: calc(var(--header-h) + 20px); }
body.portal-mode .results { padding-top: calc(var(--header-h) + 12px); }
.pt-out { display: none; }
@media (max-width: 899px) {
  .pt-out { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid #dfe6ea; background: #fff; color: #334756; cursor: pointer; }
  .pt-out svg { width: 18px; height: 18px; }
  body.portal-mode #bottom-nav { grid-auto-columns: 1fr; }
  body.portal-mode .trip-bar { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; }
  body.portal-mode .trip-bar .btn { width: 100%; justify-content: center; }
  .trip-bar-leg strong { white-space: normal; }
  body.portal-mode .container { padding-inline: 16px; }
  .job-actions .btn, .booking-actions .btn { flex: 1 1 100%; justify-content: center; min-height: 48px; }
  .btn { min-height: 46px; }
  .input, .select, .textarea { font-size: 16px; min-height: 48px; }
}

.car-nearby { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 8px; padding: 12px 16px; border: 1.5px dashed var(--ok); border-radius: 16px; background: #e8f7f4; color: #0d6e63; font-weight: 700; font-size: .88rem; text-align: left; cursor: pointer; }
.car-nearby svg { width: 18px; height: 18px; flex: none; }
.car-card.is-sold { opacity: 1; }
body.admin-mode .scroll-progress { display: none; }
