/* ============================================================
   Thési — Tab views layout (Map / Search / Activity / Account)
   ============================================================ */
:root { --tabbar-h: 60px; }

/* Bottom tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  height: calc(var(--tabbar-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
  display: flex; background: var(--surface); border-top: 1px solid var(--line);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--ink-400); font-size: var(--fs-11); font-weight: var(--fw-medium);
}
.tab i { font-size: 22px; }
.tab.active { color: var(--ink-900); }
.tab.has-alert i { position: relative; }
.tab.has-alert i::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 2px var(--surface);
}

/* Full-screen tab views (above map, below tab bar) */
.view {
  position: fixed; left: 0; right: 0;
  top: calc(var(--topbar-h) + var(--safe-top)); bottom: var(--tabbar-h);
  z-index: 30; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: var(--s4) var(--s5) var(--s8);
}
.view-header { font-size: var(--fs-22); font-weight: var(--fw-semibold); letter-spacing: var(--tracking-tight); margin: var(--s2) 0 var(--s4); }

/* Search */
.area-chips { display: flex; gap: var(--s2); overflow-x: auto; padding-bottom: var(--s2); margin-bottom: var(--s3); }
.chip { flex: none; min-height: 44px; padding: 0 var(--s4); border-radius: var(--r-pill);
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--fs-13); font-weight: var(--fw-medium); color: var(--text); }
.chip.active { background: var(--ink-900); color: #fff; box-shadow: none; }

/* Activity */
.timeline-step { display: flex; gap: var(--s3); align-items: center; padding: var(--s2) 0; }
.timeline-step .tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-300); flex: none; }
.timeline-step.done .tl-dot { background: var(--live); }

/* Empty states */
.empty { text-align: center; padding: var(--s10) var(--s4); color: var(--text-2); }
.empty i { font-size: 36px; color: var(--ink-300); display: block; margin-bottom: var(--s3); }

/* ---------- Uber/Bolt-level mobile surfaces ---------- */
.auth-brandbar {
  height: 58px; display: flex; align-items: center; gap: 12px;
  font-size: 22px; font-weight: 700; letter-spacing: -.03em;
}
.auth-logo {
  width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: #000; color: #fff; font-weight: 700;
}
.auth-shell {
  width: min(100%, 380px); margin: 0 auto; flex: 1;
  display: flex; flex-direction: column; justify-content: center; gap: 28px;
}
.auth-title { font-size: 28px; line-height: 1.08; letter-spacing: -.04em; margin-bottom: 10px; }
.auth-sub { margin-bottom: 22px; }
.auth-field { height: 58px; font-size: 17px; border-radius: 8px; box-shadow: inset 0 0 0 2px var(--ink-900); }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--text-2); font-size: 14px; font-weight: 500; }
.auth-divider span { height: 1px; background: var(--line-strong); flex: 1; }
.auth-divider b { font-weight: 500; }
.auth-foot { text-align: left; color: var(--text-2); }
.mode-caption { margin-top: 10px; font-weight: 700; color: var(--live); }

.avatar-xl { width: 78px; height: 78px; font-size: 28px; background: radial-gradient(circle at 35% 25%, #f4f4f4, #cfd3d7); color: var(--ink-600); }
.account-hero { margin-bottom: 16px; }
.account-name {
  font-size: clamp(36px, 11vw, 54px); line-height: .95; letter-spacing: -.06em; font-weight: 800;
}
.rating-badge {
  display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px; border-radius: 7px;
  background: var(--ink-050); font-weight: 700; font-size: 14px;
}
.rating-badge i { color: #000; font-size: 14px; }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.quick-tile {
  min-height: 86px; border-radius: 18px; background: var(--surface-2);
  display: flex; align-items: center; gap: 14px; padding: 18px; text-align: left;
  font-size: 23px; font-weight: 800; letter-spacing: -.03em;
}
.quick-tile i { font-size: 29px; color: #000; }
.quick-tile small { display: block; color: var(--text-2); font-size: 12px; font-weight: 700; letter-spacing: 0; margin-left: auto; }
.account-card {
  width: 100%; background: var(--surface-2); border-radius: 18px; padding: 20px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; text-align: left;
}
.safety-check { min-height: 116px; }
.score-ring {
  --p: .2; width: 68px; height: 68px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: conic-gradient(#3f6df6 calc(var(--p) * 1turn), #fff 0), var(--ink-100);
  position: relative;
}
.score-ring::after { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: var(--surface-2); }
.score-ring b { position: relative; z-index: 1; color: #3f6df6; font-size: 20px; }
.invite-card {
  width: 100%; min-height: 104px; border-radius: 18px; background: var(--surface-2); padding: 20px; margin-bottom: 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 14px; text-align: left;
}
.invite-card b { display: block; font-size: 20px; letter-spacing: -.03em; margin-bottom: 4px; }
.invite-card small { display: block; color: var(--text-2); font-size: 15px; }
.invite-card i { font-size: 38px; color: var(--info); }

.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.service-card {
  min-height: 104px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; padding: 16px; text-align: left;
}
.service-card.active { background: #000; color: #fff; box-shadow: none; }
.service-card i { font-size: 28px; }
.service-card b { font-size: 18px; letter-spacing: -.02em; }
.service-card small { color: currentColor; opacity: .68; font-size: 12px; line-height: 1.25; }

.activity-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.filter-lite { width: 54px; height: 54px; box-shadow: none; background: var(--surface-2); }
.active-trip { padding: 0 0 18px; overflow: hidden; }
.active-trip > .row, .active-trip > .trip-progress, .active-trip > .timeline-compact, .active-trip > .safety-strip, .active-trip > .t-caption, .active-trip > .btn {
  margin-left: 18px; margin-right: 18px;
}
.trip-mini-map {
  height: 150px; margin-bottom: 18px; background:
    linear-gradient(135deg, rgba(31,95,191,.10), rgba(21,122,78,.10)),
    repeating-linear-gradient(25deg, transparent 0 28px, rgba(13,15,18,.055) 29px 31px);
  display: flex; align-items: center; justify-content: center; position: relative; color: #000;
}
.trip-mini-map i { font-size: 42px; z-index: 1; }
.trip-mini-map span, .trip-mini-map b {
  position: absolute; height: 5px; background: #000; border-radius: 999px; width: 58%; transform: rotate(-15deg);
}
.trip-mini-map b { width: 11px; height: 11px; border-radius: 3px; left: 22%; top: 58%; transform: none; }
.icon-soft { width: 54px; height: 54px; border-radius: 14px; background: var(--ink-050); font-size: 22px; }
.trip-progress { height: 5px; background: var(--ink-100); border-radius: 999px; overflow: hidden; margin-top: 16px; }
.trip-progress i { display: block; height: 100%; background: #3f6df6; }
.timeline-compact { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 10px; }
.timeline-compact span { color: var(--text-3); font-size: 11px; font-weight: 700; }
.timeline-compact span.done { color: var(--text); }
.safety-strip {
  margin-top: 16px; background: #eef4ff; border: none; box-shadow: none;
  display: flex; align-items: center; gap: 12px; color: #172033;
}
.safety-strip i { font-size: 26px; }
.history-list { display: flex; flex-direction: column; gap: 12px; }
.past-card, .past-row {
  background: var(--surface); border-radius: 18px; box-shadow: inset 0 0 0 1px var(--line);
  padding: 16px; display: flex; gap: 14px; align-items: center;
}
.past-card.large { display: block; padding: 14px; }
.past-map {
  height: 150px; border-radius: 14px; margin-bottom: 16px; background:
    linear-gradient(135deg, rgba(31,95,191,.10), rgba(180,105,14,.08)),
    repeating-linear-gradient(135deg, transparent 0 24px, rgba(13,15,18,.06) 25px 27px);
  display: flex; align-items: center; justify-content: center;
}
.past-map i { font-size: 44px; }
.past-icon { width: 62px; height: 62px; border-radius: 14px; background: var(--ink-100); display: flex; align-items: center; justify-content: center; flex: none; }
.past-icon i { font-size: 26px; color: var(--ink-600); }

/* Dedicated live handover screen */
.handover-view {
  position: fixed; inset: 0; z-index: 62; pointer-events: none;
  animation: handoverIn .28s var(--ease);
}
.handover-view.hidden { display: none !important; }
.handover-top {
  position: absolute; left: 18px; right: 18px; top: calc(var(--safe-top) + 16px);
  display: flex; justify-content: space-between; align-items: center; pointer-events: auto;
}
.handover-back, .handover-safety {
  border: 0; background: rgba(255,255,255,.94); color: var(--text); box-shadow: var(--e2);
  height: 56px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; backdrop-filter: blur(16px);
}
.handover-back { width: 56px; font-size: 24px; }
.handover-safety { padding: 0 18px; gap: 8px; }
.handover-pin-label {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  pointer-events: none; background: #050505; color: white; border-radius: 999px;
  padding: 11px 16px; font-weight: 750; font-size: 15px; box-shadow: var(--e2);
  max-width: min(82vw, 420px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.handover-panel {
  position: absolute; left: 0; right: 0; bottom: 0; pointer-events: auto;
  background: var(--surface); border-radius: 28px 28px 0 0; padding: 10px 18px calc(var(--safe-bottom) + 18px);
  box-shadow: 0 -18px 60px rgba(15, 23, 42, .18); max-height: 58vh; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.handover-handle { width: 54px; height: 5px; border-radius: 999px; background: var(--line); margin: 2px auto 18px; }
.handover-arrival { text-align: center; font-size: 28px; font-weight: 800; letter-spacing: -.04em; color: var(--text); }
.handover-subtitle { text-align: center; color: var(--text-2); font-size: 15px; margin-top: 5px; }
.handover-progress { height: 5px; background: var(--ink-100); border-radius: 99px; overflow: hidden; margin: 22px 0 10px; }
.handover-progress i { display: block; height: 100%; background: #0b57ff; border-radius: inherit; transition: width .35s var(--ease); }
.handover-steps { display: grid; grid-template-columns: repeat(4, 1fr); color: var(--ink-400); font-size: 11px; font-weight: 750; margin-bottom: 18px; }
.handover-steps span.done { color: var(--text); }
.handover-alert {
  display: flex; align-items: center; gap: 12px; background: #edf4ff; border-radius: 18px; padding: 14px 16px;
  color: #16325c; font-weight: 650; margin-bottom: 14px;
}
.handover-card { border: 1px solid var(--line); border-radius: 20px; padding: 16px; margin-bottom: 14px; background: var(--surface); }
.handover-contact-row { display: grid; grid-template-columns: 1fr 86px; gap: 10px; margin-top: 14px; }
.handover-actions { display: grid; gap: 10px; }
.handover-wait { text-align: center; color: var(--text-2); background: var(--ink-050); border-radius: 16px; padding: 16px; font-weight: 650; }
.confirm-pin-flow { width: min(420px, calc(100vw - 28px)); overflow: hidden; border-radius: 28px; background: var(--surface); }
.confirm-pin-map { height: 360px; position: relative; background: var(--ink-050); }
.pin-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); z-index: 600; color: #050505; font-size: 44px; pointer-events: none; filter: drop-shadow(0 12px 20px rgba(0,0,0,.24)); }
.confirm-pin-panel { padding: 20px; }
@keyframes handoverIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (min-width: 760px) {
  .handover-panel { left: 50%; right: auto; width: min(560px, 92vw); transform: translateX(-50%); bottom: 18px; border-radius: 28px; padding-bottom: 18px; }
}

/* Account trust/help utilities */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.stats-strip > div {
  min-height: 72px;
  border-radius: 18px;
  background: var(--ink-050);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.stats-strip b { font-size: 22px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stats-strip span { font-size: 11px; color: var(--text-2); font-weight: 700; }
.faq-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 0; }
.faq-item summary { cursor: pointer; font-weight: 800; color: var(--text); }
.faq-item p { margin: 9px 0 0; color: var(--text-2); line-height: 1.45; font-size: 14px; }

/* Activity detail polish */
.notification-detail-map,
.detail-route-map {
  height: 170px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(11,87,255,.10), rgba(21,122,78,.10)),
    repeating-linear-gradient(30deg, transparent 0 26px, rgba(13,15,18,.055) 27px 29px);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.notification-detail-map i,
.detail-route-map i { font-size: 46px; color: #050505; z-index: 2; }
.detail-route-map span,
.detail-route-map b {
  position: absolute;
  height: 5px;
  width: 64%;
  background: #050505;
  border-radius: 999px;
  transform: rotate(-13deg);
}
.detail-route-map b { width: 12px; height: 12px; border-radius: 4px; left: 20%; top: 60%; transform: none; }
.detail-title { font-size: clamp(30px, 8vw, 44px); line-height: 1.02; letter-spacing: -.055em; font-weight: 850; max-width: 310px; }
.route-line i { font-size: 22px; color: #050505; margin-right: 16px; }
.route-line small { display: block; color: var(--text-2); margin-top: 2px; }
.handover-detail-sheet { padding-bottom: 8px; }

/* Live handover map overlays */
.handover-map-pin {
  transform: translate(-50%, -100%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 9px 12px;
  white-space: nowrap;
  box-shadow: 0 12px 32px rgba(0,0,0,.22);
  border: 2px solid #fff;
  font-size: 12px;
  font-weight: 850;
}
.handover-map-pin i { font-size: 17px; }
.handover-map-pin.spot { background: #050505; color: #fff; }
.handover-map-pin.person { background: #0b57ff; color: #fff; }
.handover-map-pin.person b { background: rgba(255,255,255,.18); border-radius: 999px; padding: 2px 6px; }

/* Road test + notification inbox */
.note-filter {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.note-filter .chip {
  min-height: 38px;
  padding: 0 13px;
  font-size: 12px;
  font-weight: 800;
}
.row-press.is-read { opacity: .74; }
.row-press:active, .quick-tile:active, .account-card:active, .past-card:active, .past-row:active {
  transform: scale(.992);
  transition: transform .08s ease;
}

/* Guided support */
.support-kind-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.support-kind {
  min-height: 104px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.support-kind i { font-size: 24px; }
.support-kind b { font-size: 16px; letter-spacing: -.02em; }
.support-kind span { color: var(--text-2); font-size: 12px; line-height: 1.25; }
.support-kind.active { background: #050505; color: #fff; border-color: #050505; }
.support-kind.active span { color: rgba(255,255,255,.72); }
