/* ============================================================
   MistriNow — app.css (v15 — header z-index fix)
   ============================================================ */

:root {
  --header-h: 62px;
  --nav-h: 82px;
  --z-header: 2000;
  --z-menu: 2100;
  --z-search: 950;
  --z-sheet: 100;
  --z-map: 1;
}

html, body {
  margin: 0; padding: 0;
  background: #E2E8F0;
  height: 100%;
  overflow: hidden;
}
#phone {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.18);
}
@media (min-width: 500px) {
  #phone {
    height: 92dvh;
    margin-top: 4dvh;
    border-radius: 32px;
  }
}
.screen {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  padding: 0;
  padding-top: var(--header-h);
  padding-bottom: var(--nav-h);
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }

/* ---------- Auth pages ---------- */
.auth-body {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  overflow-y: auto;
  padding: 22px 20px;
}
.auth-body::-webkit-scrollbar { display: none; }
.brand { text-align: center; margin-bottom: 18px; }
.brand-mark {
  width: 58px; height: 58px; border-radius: 17px;
  background: var(--sky); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px; box-shadow: var(--shadow-sky);
}
.brand-mark svg { width: 28px; height: 28px; }
.brand-name { font-size: 24px; font-weight: 800; margin: 0; letter-spacing: -.03em; }
.brand-name span { color: var(--sky); }
.brand-tag { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.quote-slot { min-height: 54px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.quote { font-size: 19px; font-weight: 800; text-align: center; color: var(--ink); letter-spacing: -.02em; margin: 0; animation: quoteIn 4s ease-in-out; }
@keyframes quoteIn {
  0%   { opacity: 0; transform: translateY(8px); }
  12%  { opacity: 1; transform: translateY(0); }
  88%  { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-8px); }
}
.auth-card { background: var(--white); border-radius: 22px; padding: 22px; width: 100%; box-shadow: var(--shadow-lg); border: 1px solid rgba(0,0,0,.03); }
.auth-head { margin-bottom: 16px; }
.auth-head h2 { font-size: 18px; font-weight: 800; margin: 0 0 4px; }
.auth-head p { font-size: 12.5px; color: var(--muted); margin: 0; }
.role-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 5px; background: var(--bg); border-radius: var(--radius-sm); margin-bottom: 16px; }
.role-toggle button { padding: 11px 6px; border-radius: 9px; font-size: 12.5px; font-weight: 700; color: var(--muted); transition: all .2s ease; }
.role-toggle button.active { background: var(--white); color: var(--deep); box-shadow: var(--shadow-sm); }
.verify-note { background: #FEF3C7; color: #92400E; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 11.5px; font-weight: 600; line-height: 1.5; margin-bottom: 12px; }
.upload-box { display: flex; align-items: center; gap: 10px; padding: 13px 15px; border: 1.5px dashed var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .15s ease; }
.upload-box:hover { border-color: var(--sky); color: var(--deep); background: var(--soft); }
.upload-box.uploaded { border-color: var(--success); background: #ECFDF5; color: #065F46; border-style: solid; }
.auth-legal { font-size: 11px; color: var(--muted); text-align: center; margin: 14px 0 6px; }

/* ---------- App header — sits ABOVE search bar ---------- */
.app-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: var(--z-header);
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  height: var(--header-h);
  box-sizing: border-box;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.app-logo { display: flex; align-items: center; gap: 7px; font-weight: 800; font-size: 16px; letter-spacing: -.02em; }
.app-logo span { color: var(--sky); }
.logo-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--sky); }

.profile-wrap { position: relative; z-index: var(--z-menu); }
.profile-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 12px 5px 5px;
  background: var(--white); border: 1.5px solid var(--line);
  border-radius: var(--pill);
  font-size: 12.5px; font-weight: 700;
  color: var(--ink); cursor: pointer;
  transition: all .15s ease;
}
.profile-btn:hover { border-color: var(--sky); }
.profile-btn .avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: var(--soft); }

/* Dropdown — highest z-index so it's ALWAYS on top */
.profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: var(--z-menu);
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 20px 45px rgba(0,0,0,.18);
  border: 1px solid var(--line);
  padding: 6px;
  min-width: 200px;
  display: none;
}
.profile-menu.open { display: block; }
.profile-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--ink); transition: background .15s ease; cursor: pointer; }
.profile-menu a:hover { background: var(--bg); }
.profile-menu a.danger { color: var(--danger); }
.profile-menu a.danger:hover { background: #FEF2F2; }
.profile-menu hr { border: none; border-top: 1px solid var(--line); margin: 6px 8px; }

/* Header user (mechanic page) */
.header-user {
  position: relative;
  z-index: var(--z-menu);
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 5px;
  background: var(--white); border: 1.5px solid var(--line);
  border-radius: var(--pill);
  font-size: 13px; font-weight: 700;
  cursor: pointer;
}
.header-user .header-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--soft); }

/* ---------- Bottom nav ---------- */
.bottom-nav { position: absolute; bottom: 0; left: 0; right: 0; z-index: 40; height: var(--nav-h); display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255,255,255,.97); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); box-sizing: border-box; }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 9px 0 11px; gap: 3px; font-size: 10.5px; font-weight: 700; color: var(--muted); transition: color .15s ease; }
.bottom-nav a.active { color: var(--deep); }
.bottom-nav a svg { width: 21px; height: 21px; }

/* ---------- Map ---------- */
.map-wrap { position: absolute; top: var(--header-h); left: 0; right: 0; bottom: 0; z-index: var(--z-map); }
#map { position: absolute; inset: 0; background: #E8ECEF; }
.map-body .screen { padding: 0; overflow: hidden; }

.search-float { position: absolute; top: calc(var(--header-h) + 10px); left: 12px; right: 12px; z-index: var(--z-search); transition: opacity .3s ease, transform .3s ease; }
.search-float.hidden { opacity: 0; pointer-events: none; transform: translateY(-14px); }
.search-float .search-bar { display: flex; align-items: center; gap: 10px; background: var(--white); border-radius: 16px; padding: 13px 16px; box-shadow: 0 10px 28px rgba(0,0,0,.14); border: 1.5px solid transparent; transition: border-color .15s ease, box-shadow .15s ease; }
.search-float .search-bar:focus-within { border-color: var(--sky); box-shadow: 0 10px 28px rgba(56,189,248,.25); }
.search-float .search-bar svg { color: var(--muted); flex-shrink: 0; }
.search-float .search-bar input { flex: 1; border: none; outline: none; background: transparent; font-size: 14px; font-weight: 600; color: var(--ink); min-width: 0; }
.search-float .search-bar input::placeholder { color: #94A3B8; font-weight: 500; }
.search-float .search-clear { width: 24px; height: 24px; border-radius: 50%; background: var(--line); color: var(--muted); font-size: 14px; font-weight: 800; display: none; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; border: none; }
.search-float .search-clear.show { display: flex; }
.search-float .search-results { margin-top: 8px; background: var(--white); border-radius: 16px; box-shadow: 0 16px 40px rgba(0,0,0,.18); max-height: 260px; overflow-y: auto; display: none; }
.search-float .search-results.open { display: block; }
.search-float .search-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13px; line-height: 1.4; transition: background .12s ease; }
.search-float .search-item:last-child { border-bottom: none; }
.search-float .search-item:hover { background: var(--soft); }
.search-float .search-item svg { color: var(--sky); flex-shrink: 0; margin-top: 2px; }
.search-float .search-item strong { display: block; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.search-float .search-item small { color: var(--muted); font-weight: 500; }
.search-float .search-loading { padding: 16px; text-align: center; font-size: 12.5px; color: var(--muted); font-weight: 600; }

.map-actions { position: absolute; top: calc(var(--header-h) + 76px); right: 12px; z-index: 700; display: flex; flex-direction: column; gap: 8px; }
.map-action { width: 44px; height: 44px; border-radius: 14px; background: var(--white); box-shadow: 0 8px 22px rgba(0,0,0,.14); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; color: var(--ink); cursor: pointer; transition: all .15s ease; border: none; }
.map-action:hover { background: var(--sky); color: var(--white); }

.map-locate { position: absolute; right: 12px; bottom: 300px; z-index: 700; width: 48px; height: 48px; border-radius: 50%; background: var(--white); color: var(--deep); font-size: 20px; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 26px rgba(0,0,0,.15); cursor: pointer; border: none; transition: bottom .35s cubic-bezier(.2,.9,.3,1); }

.loc-label { position: absolute; top: calc(var(--header-h) + 76px); left: 50%; transform: translateX(-50%); z-index: 600; background: var(--ink); color: var(--white); padding: 6px 13px; border-radius: var(--pill); font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; box-shadow: var(--shadow-md); pointer-events: none; white-space: nowrap; max-width: 70%; overflow: hidden; text-overflow: ellipsis; }
.map-hint { position: absolute; top: calc(var(--header-h) + 116px); left: 50%; transform: translateX(-50%); z-index: 600; background: rgba(56,189,248,.95); color: var(--white); padding: 6px 13px; border-radius: var(--pill); font-size: 11.5px; font-weight: 700; box-shadow: var(--shadow-sky); pointer-events: none; transition: opacity .4s ease; white-space: nowrap; }
.map-hint.fade { opacity: 0; }

/* Radar */
.radar-wrap { position: absolute; width: 0; height: 0; pointer-events: none; z-index: 90; display: none; }
.radar-wrap.active { display: block; }
.radar-ring { position: absolute; width: 80px; height: 80px; border-radius: 50%; border: 2px solid rgba(56,189,248,.65); background: rgba(56,189,248,.12); left: -40px; top: -40px; animation: radarExpand 2.4s cubic-bezier(.2,.7,.4,1) infinite; }
.radar-ring:nth-child(2) { animation-delay: .8s; }
.radar-ring:nth-child(3) { animation-delay: 1.6s; }
@keyframes radarExpand {
  0%   { transform: scale(.4); opacity: 1; }
  100% { transform: scale(3.2); opacity: 0; }
}

.search-status { position: absolute; top: calc(var(--header-h) + 76px); left: 12px; z-index: 650; display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--white); border: 1.5px solid var(--sky); border-radius: 14px; font-size: 12.5px; font-weight: 800; color: var(--ink); box-shadow: 0 10px 26px rgba(56,189,248,.3); pointer-events: none; white-space: nowrap; max-width: calc(100% - 130px); overflow: hidden; text-overflow: ellipsis; }
.search-status .spin-dot { width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid var(--soft); border-top-color: var(--sky); animation: spinRing .9s linear infinite; flex-shrink: 0; }
@keyframes spinRing { to { transform: rotate(360deg); } }

.live-pill { position: absolute; top: calc(var(--header-h) + 76px); left: 12px; z-index: 650; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--white); border: 1.5px solid var(--sky); border-radius: var(--pill); font-size: 12px; font-weight: 800; color: var(--ink); box-shadow: 0 8px 24px rgba(56,189,248,.35); pointer-events: none; white-space: nowrap; max-width: calc(100% - 100px); overflow: hidden; text-overflow: ellipsis; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 0 rgba(16,185,129,.6); animation: livePulse 1.5s infinite; flex-shrink: 0; }
@keyframes livePulse {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,.6); }
  70%  { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

.mini-map { position: absolute; top: calc(var(--header-h) + 76px); right: 12px; z-index: 700; width: 112px; height: 112px; border-radius: 16px; background: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.22); overflow: hidden; border: 2px solid #fff; opacity: 0; pointer-events: none; transform: scale(.8); transition: opacity .35s ease, transform .35s cubic-bezier(.2,.9,.3,1.3); }
.mini-map.show { opacity: 1; transform: scale(1); pointer-events: auto; }
.mini-map-inner { position: absolute; inset: 0; }
.mini-map-badge { position: absolute; bottom: 5px; left: 5px; right: 5px; background: rgba(15,23,42,.85); color: #fff; font-size: 9.5px; font-weight: 800; padding: 3px 6px; border-radius: 6px; text-align: center; z-index: 2; pointer-events: none; }
.mini-map-badge .live-dot { display: inline-block; width: 6px; height: 6px; margin-right: 4px; vertical-align: middle; }

.mn-mech-marker.moving { box-shadow: 0 0 0 0 rgba(56,189,248,.6); animation: mechPulse 1.5s infinite; }
@keyframes mechPulse {
  0%   { box-shadow: 0 0 0 0 rgba(56,189,248,.7); }
  70%  { box-shadow: 0 0 0 14px rgba(56,189,248,0); }
  100% { box-shadow: 0 0 0 0 rgba(56,189,248,0); }
}

/* ============================================================
   BOTTOM SHEET
   ============================================================ */
.sheet {
  position: absolute;
  left: 0; right: 0;
  bottom: var(--nav-h);
  z-index: var(--z-sheet);
  background: var(--white);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -14px 44px rgba(0,0,0,.14);
  display: flex;
  flex-direction: column;
  will-change: height;
  transition: height .32s cubic-bezier(.2,.9,.3,1);
  overflow: hidden;
  touch-action: none;
  height: 34%;
  min-height: 180px;
}
.sheet.dragging { transition: none; }

.sheet-grab {
  width: 100%; height: 30px;
  display: flex; align-items: center; justify-content: center;
  cursor: grab;
  flex-shrink: 0;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.sheet-grab:active { cursor: grabbing; }
.sheet-grab::after {
  content: '';
  width: 46px; height: 5px;
  background: var(--line);
  border-radius: 5px;
  transition: background .15s ease, width .15s ease;
}
.sheet-grab:hover::after,
.sheet.dragging .sheet-grab::after { background: var(--sky); width: 64px; }

.sheet-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 18px calc(16px + env(safe-area-inset-bottom));
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
}
.sheet-content::-webkit-scrollbar { display: none; }

.sheet-head { margin-bottom: 12px; }
.sheet-head h2 { font-size: 17px; font-weight: 800; margin: 0 0 3px; letter-spacing: -.02em; }
.sheet-head p { font-size: 12px; color: var(--muted); margin: 0; }

.vehicle-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.vehicle-card { padding: 12px 6px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--white); text-align: center; transition: all .15s ease; cursor: pointer; }
.vehicle-card.active { border-color: var(--sky); background: var(--soft); box-shadow: 0 0 0 3px rgba(56,189,248,.2); }
.v-ico { font-size: 22px; margin-bottom: 3px; }
.v-name { font-size: 11.5px; font-weight: 700; color: var(--ink); }
.vehicle-card.active .v-name { color: var(--deep); }

.fuel-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.fuel-chip { padding: 9px 4px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--white); font-size: 11px; font-weight: 700; color: var(--ink); text-align: center; transition: all .15s ease; cursor: pointer; }
.fuel-chip.active { border-color: var(--sky); background: var(--soft); color: var(--deep); box-shadow: 0 0 0 3px rgba(56,189,248,.2); }

.issue-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.issue-chip { padding: 11px 10px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--white); font-size: 11.5px; font-weight: 600; text-align: left; transition: all .15s ease; cursor: pointer; }
.issue-chip.active { border-color: var(--sky); background: var(--soft); color: var(--deep); box-shadow: 0 0 0 3px rgba(56,189,248,.2); }
.issue-chip.wide { grid-column: 1 / -1; }

.other-desc { margin-top: -4px; margin-bottom: 10px; display: none; }
.other-desc.show { display: block; }
.other-desc textarea { width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font-family: inherit; font-size: 12.5px; resize: vertical; outline: none; min-height: 56px; }
.other-desc textarea:focus { border-color: var(--sky); box-shadow: 0 0 0 4px rgba(56,189,248,.18); }

.row-btns { display: flex; gap: 8px; }
.row-btns .btn { flex: 1; }

.mech-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.mech-card { padding: 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--white); transition: all .15s ease; }
.mech-card:hover { border-color: var(--sky); box-shadow: 0 4px 14px rgba(56,189,248,.15); }
.mech-row { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.mech-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--soft); color: var(--deep); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; flex-shrink: 0; }
.mech-info { flex: 1; min-width: 0; }
.mech-info strong { display: block; font-size: 13px; font-weight: 700; }
.mech-info small { font-size: 11px; color: var(--muted); }
.mech-meta { text-align: right; font-size: 11px; flex-shrink: 0; }
.mech-meta .rate { color: var(--deep); font-weight: 800; font-size: 12.5px; }
.mech-meta .eta { color: var(--muted); font-weight: 600; }

.mech-card-actions { display: flex; gap: 6px; margin-top: 8px; }
.mech-card-actions button, .mech-card-actions a { flex: 1; padding: 8px 10px; border-radius: 10px; font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 4px; transition: all .15s ease; text-decoration: none; cursor: pointer; border: none; }
.mech-card-actions .act-call { background: var(--soft); color: var(--deep); border: 1.5px solid var(--soft); }
.mech-card-actions .act-call:hover { background: var(--sky); color: var(--white); border-color: var(--sky); }
.mech-card-actions .act-book { background: var(--sky); color: var(--white); border: 1.5px solid var(--sky); }
.mech-card-actions .act-book:hover { background: var(--deep); border-color: var(--deep); }

.sent-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: linear-gradient(135deg, #FEF3C7, #FFFBEB); border: 1.5px solid var(--warning); border-radius: var(--radius); margin-bottom: 12px; }
.sent-banner.accepted { border-color: var(--success); background: linear-gradient(135deg, #D1FAE5, #ECFDF5); }
.sent-check { width: 34px; height: 34px; border-radius: 50%; background: var(--warning); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; flex-shrink: 0; box-shadow: 0 6px 18px rgba(245,158,11,.4); }
.sent-banner.accepted .sent-check { background: var(--success); box-shadow: 0 6px 18px rgba(16,185,129,.4); }
.sent-txt { flex: 1; min-width: 0; }
.sent-txt strong { display: block; font-size: 13px; font-weight: 800; color: var(--ink); margin-bottom: 2px; }
.sent-txt small { font-size: 11px; color: var(--muted); font-weight: 600; }

.eta-banner { display: flex; justify-content: space-between; align-items: center; background: linear-gradient(135deg, var(--soft), #FFFFFF); border: 1.5px solid #BAE6FD; border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; }
.eta-left, .eta-right { display: flex; flex-direction: column; gap: 2px; }
.eta-right { text-align: right; }
.eta-label { font-size: 10px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.eta-banner strong { font-size: 17px; font-weight: 800; }

.timeline { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; padding-left: 22px; position: relative; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 12px; bottom: 12px; width: 2px; background: var(--line); }
.tl-step { display: flex; align-items: center; gap: 12px; padding: 5px 0; position: relative; z-index: 1; }
.tl-step i { width: 13px; height: 13px; border-radius: 50%; background: var(--white); border: 2px solid var(--line); position: absolute; left: -22px; transition: all .3s; }
.tl-step span { font-size: 12px; font-weight: 600; color: var(--muted); }
.tl-step.done i { background: var(--success); border-color: var(--success); }
.tl-step.done span { color: var(--ink); }
.tl-step.active i { background: var(--sky); border-color: var(--sky); box-shadow: 0 0 0 4px rgba(56,189,248,.3); }
.tl-step.active span { color: var(--deep); font-weight: 700; }

.contact-row { display: flex; gap: 8px; margin-bottom: 8px; }
.contact-row .btn { flex: 1; padding: 10px; font-size: 12px; }

/* ---------- Mechanic dashboard ---------- */
.mech-map-body { position: absolute; inset: 0; overflow: hidden; }
#mechMap { position: absolute; top: var(--header-h); left: 0; right: 0; bottom: 0; z-index: var(--z-map); background: #E8ECEF; }

.mech-main { padding: 16px; }
.verify-card { background: var(--white); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-md); text-align: center; border: 1px solid var(--line); }
.verify-ico { font-size: 40px; margin-bottom: 10px; }
.verify-card h2 { margin: 0 0 6px; font-size: 17px; font-weight: 800; }
.verify-card p { color: var(--muted); font-size: 12.5px; margin: 0 0 14px; }
.verify-details { text-align: left; background: var(--bg); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 14px; }
.verify-details .row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 12px; }
.verify-details .row + .row { border-top: 1px solid var(--line); }
.verify-details .row span { color: var(--muted); font-weight: 600; }
.verify-details .row strong { font-weight: 700; }

.online-toggle { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--white); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); margin-bottom: 12px; cursor: pointer; user-select: none; border: 1px solid var(--line); }
.toggle-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(16,185,129,.2); }
.online-toggle.offline .toggle-dot { background: var(--muted); box-shadow: 0 0 0 4px rgba(100,116,139,.15); }
.online-toggle span { font-weight: 700; font-size: 13.5px; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.stat { background: var(--white); border-radius: var(--radius-sm); padding: 11px; box-shadow: var(--shadow-sm); text-align: center; border: 1px solid var(--line); }
.stat strong { display: block; font-size: 16px; font-weight: 800; }
.stat span { font-size: 10px; color: var(--muted); font-weight: 600; }

.section-title { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 8px; }
.job-card { background: var(--white); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); margin-bottom: 14px; }
.job-card.incoming { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(56,189,248,.18); }
.job-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.job-head strong { font-size: 13.5px; font-weight: 800; }
.badge { padding: 4px 10px; border-radius: var(--pill); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.badge.sky { background: var(--soft); color: var(--deep); }
.badge.green { background: #D1FAE5; color: #065F46; }
.badge.amber { background: #FEF3C7; color: #92400E; }
.job-desc { font-size: 12px; margin: 0 0 10px; }
.job-actions { display: flex; gap: 6px; }
.job-actions .btn { flex: 1; padding: 10px; font-size: 12px; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-ico { font-size: 40px; margin-bottom: 10px; }
.empty-state h3 { font-size: 15px; color: var(--ink); margin: 0 0 5px; font-weight: 800; }
.empty-state p { font-size: 12px; margin: 0; }

/* ---------- Admin ---------- */
.admin-tag { font-weight: 500; color: var(--muted); font-size: 11px; margin-left: 6px; }
.admin-images { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.admin-img { width: 68px; height: 68px; border-radius: 10px; object-fit: cover; border: 2px solid var(--line); cursor: pointer; transition: all .15s ease; }
.admin-img:hover { border-color: var(--sky); transform: scale(1.04); }
.img-caption { font-size: 10px; font-weight: 700; color: var(--muted); text-align: center; margin-top: 2px; }
.lightbox { position: fixed; inset: 0; z-index: 9000; background: rgba(0,0,0,.9); display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.lightbox.show { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 12px; }
.lightbox-close { position: absolute; top: 16px; right: 20px; width: 40px; height: 40px; border-radius: 50%; background: var(--white); color: var(--ink); font-size: 20px; font-weight: 800; }

/* ---------- Profile ---------- */
.profile-hero { background: linear-gradient(135deg, var(--soft), #F0F9FF); border-radius: var(--radius); padding: 24px 18px; text-align: center; margin-bottom: 14px; box-shadow: var(--shadow-sm); border: 1px solid #BAE6FD; position: relative; }
.profile-photo-wrap { position: relative; display: inline-block; margin-bottom: 10px; }
.profile-photo { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 4px solid var(--white); box-shadow: var(--shadow-md); background: var(--white); display: block; }
.photo-edit { position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%; background: var(--sky); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 14px; border: 3px solid var(--white); box-shadow: var(--shadow-sky); cursor: pointer; }
.profile-hero h1 { font-size: 19px; font-weight: 800; margin: 0 0 4px; }
.profile-hero p { font-size: 12px; margin: 0 0 9px; color: var(--muted); }
.role-badge { display: inline-block; padding: 4px 12px; background: var(--sky); color: var(--white); border-radius: var(--pill); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.profile-section { background: var(--white); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.info-list { display: flex; flex-direction: column; }
.info-list .row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 12.5px; }
.info-list .row + .row { border-top: 1px solid var(--line); }
.info-list .row span { color: var(--muted); font-weight: 600; }
.info-list .row strong { font-weight: 700; text-align: right; max-width: 60%; }
.review-item { background: var(--bg); border-radius: var(--radius-sm); padding: 11px 13px; border-left: 3px solid var(--sky); margin-bottom: 8px; }
.review-stars { color: var(--warning); font-size: 13px; margin-bottom: 3px; }
.review-text { font-size: 12.5px; margin: 4px 0 0; }
.review-meta { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 4px; }

/* ---------- Settings ---------- */
.settings-row { display: flex; justify-content: space-between; align-items: center; background: var(--white); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 8px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; }
.switch { position: relative; width: 40px; height: 22px; background: var(--line); border-radius: var(--pill); transition: background .2s ease; cursor: pointer; flex-shrink: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); box-shadow: var(--shadow-sm); transition: transform .2s ease; }
.switch.on { background: var(--sky); }
.switch.on::after { transform: translateX(18px); }

/* ---------- Support ---------- */
.faq-item { background: var(--white); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 8px; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.faq-item summary { font-weight: 700; font-size: 12.5px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 17px; color: var(--muted); }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { font-size: 12px; color: var(--muted); margin: 8px 0 0; }

/* ---------- Modals ---------- */
.modal { position: fixed; inset: 0; z-index: 3000; background: rgba(15,23,42,.6); display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.modal.show { opacity: 1; pointer-events: auto; }
.modal-card { background: var(--white); border-radius: 22px; padding: 22px; max-width: 380px; width: 100%; box-shadow: var(--shadow-lg); max-height: 85vh; overflow-y: auto; }
.modal-ico { font-size: 42px; text-align: center; margin-bottom: 8px; }
.modal-card h2 { text-align: center; font-size: 17px; font-weight: 800; margin: 0 0 6px; }
.modal-card > p { text-align: center; font-size: 12px; color: var(--muted); margin: 0 0 16px; }
.stars { display: flex; justify-content: center; gap: 8px; margin-bottom: 12px; }
.stars span { font-size: 32px; color: var(--line); cursor: pointer; transition: all .15s ease; line-height: 1; }
.stars span:hover, .stars span.active { color: var(--warning); transform: scale(1.12); }
.modal-card textarea { width: 100%; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font-size: 13px; resize: vertical; font-family: inherit; outline: none; margin-bottom: 12px; }
.modal-card textarea:focus { border-color: var(--sky); box-shadow: 0 0 0 4px rgba(56,189,248,.18); }

.sos-float { position: absolute; right: 14px; bottom: 300px; z-index: 900; width: 48px; height: 48px; border-radius: 50%; background: var(--danger); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 19px; font-weight: 800; box-shadow: 0 12px 24px rgba(239,68,68,.45); transition: bottom .35s cubic-bezier(.2,.9,.3,1), transform .15s ease; border: none; }
.sos-float:hover { transform: scale(1.05); }

.leaflet-container { font-family: inherit; }
.leaflet-control-attribution { display: none !important; }
.leaflet-control-zoom { display: none !important; }
.mn-user-marker, .mn-mech-marker { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--white); box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.mn-user-marker { background: var(--deep); }
.mn-mech-marker { background: var(--sky); }
.user-pulse { width: 46px; height: 46px; border-radius: 50%; background: rgba(2,132,199,.22); animation: userPulse 2s infinite; position: absolute; left: -12px; top: -12px; }
@keyframes userPulse {
  0%   { transform: scale(.6); opacity: 1; }
  100% { transform: scale(1.8); opacity: 0; }
}

.hidden { display: none !important; }
/* ============================================================
   FIX: Bottom nav absolutely pinned to #phone
   ============================================================ */
#phone {
  position: relative !important;
  overflow: hidden !important;
}

.bottom-nav {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  top: auto !important;
  transform: none !important;
  width: auto !important;
  max-width: none !important;
  height: var(--nav-h) !important;
  z-index: 100 !important;
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  background: rgba(255,255,255,.97) !important;
  backdrop-filter: blur(12px) !important;
  border-top: 1px solid var(--line) !important;
  padding-bottom: env(safe-area-inset-bottom) !important;
  box-sizing: border-box !important;
}

/* Leave room for the nav in every screen container */
.screen {
  padding-bottom: calc(var(--nav-h) + 12px) !important;
}