/* Niklo styles — mobile-first, app-like dark theme matching the Niklo logo
   (near-black + blue/teal/purple gradient). Roman Urdu UI. Comments in English. */
:root {
  --bg: #060a13;          /* page background — matches logo backdrop */
  --card: #101828;        /* cards / sheets */
  --card2: #0b1220;       /* inputs, recessed areas */
  --line: #1e2a44;        /* borders */
  --ink: #f2f6fc;         /* main text */
  --muted: #93a1b8;       /* secondary text */
  --blue: #2f7bff;
  --teal: #22d3ee;
  --purple: #a855f7;
  --green: #22c55e;
  --green-soft: #34d399;
  --danger: #f87171;
  --grad: linear-gradient(135deg, #2f7bff 0%, #22d3ee 65%, #34d399 110%);
  --radius: 16px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--ink);
  min-height: 100vh; touch-action: manipulation;
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
}

/* Boot overlay */
.boot { position: fixed; inset: 0; background: var(--bg); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; z-index: 1000; transition: opacity .3s; }
.boot.hide { opacity: 0; pointer-events: none; }
.boot-logo { width: 128px; height: 128px; border-radius: 28px;
  box-shadow: 0 8px 40px rgba(47,123,255,.35); }
.boot-name { font-size: 34px; font-weight: 800; letter-spacing: 1px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; }
.boot-tag { opacity: .75; color: var(--muted); }
.boot-bar { width: 160px; height: 6px; background: #1a2440; border-radius: 3px; overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 40%; background: var(--grad); border-radius: 3px;
  animation: slide 1s infinite linear; }
@keyframes slide { from { transform: translateX(-100%);} to { transform: translateX(400%);} }

/* Top bar — app-like */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(6,10,19,.96); color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  padding-top: max(10px, env(safe-area-inset-top)); }
.brand { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 9px; }
.brand-logo { width: 32px; height: 32px; border-radius: 9px; }
.brand span { background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.tbtn { background: #16203a; color: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px; font-size: 14px; min-height: 40px; }
.user-chip { font-size: 13px; background: #16203a; border: 1px solid var(--line);
  color: var(--teal); padding: 6px 10px; border-radius: 20px; font-weight: 700; }

/* Screens */
.screen { padding-bottom: max(40px, env(safe-area-inset-bottom)); min-height:100vh; display:flex; flex-direction:column; }
.screen[hidden] { display:none !important; }
.screen .wrap.narrow { flex:1; display:flex; flex-direction:column; }
#scr-bot { padding-bottom: 0 !important; }
#scr-bot { display:flex; flex-direction:column; min-height:100dvh; }
#scr-bot .wrap.narrow { flex:1; display:flex; flex-direction:column; padding:0 12px; width:100%; max-width:480px; margin:0 auto; }
#scr-bot .bot-header { flex-shrink:0; display:flex !important; background:#0a0f1c; padding:10px 0; align-items:center; gap:10px; }
#scr-bot .bot-msgs { flex:1; min-height:200px; margin:8px 0; overflow-y:auto; -webkit-overflow-scrolling:touch; display:flex; flex-direction:column; }
#scr-bot .chat-inputrow { flex-shrink:0; display:flex !important; visibility:visible !important; opacity:1 !important; padding:8px 4px; background:#0a0f1c; border-top:1px solid #223; }
.wrap { max-width: 640px; margin: 0 auto; padding: 16px; }
.wrap.narrow { max-width: 480px; }
.wrap.wide { max-width: 960px; }
.center { text-align: center; }
h1 { font-size: 24px; margin: 8px 0 12px; }
h2 { font-size: 18px; margin: 22px 0 10px; }
.muted { color: var(--muted); }
.err { color: var(--danger); font-weight: 600; }
.hint { color: var(--muted); font-size: 13px; }

/* Role select cards — big tappable, owner's explicit requirement */
.role-h { font-size: 22px; text-align: center; margin-top: 26px; }
.role-sub { text-align: center; color: var(--muted); }
/* Role select — avatar icons with clear selected state */
.role-pick { display: flex; gap: 12px; margin-top: 24px; }
.role-opt { flex: 1; background: var(--card); border: 2px solid var(--line); border-radius: 20px;
  padding: 26px 10px 22px; display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--ink); position: relative; min-height: 200px; justify-content: center; }
.role-opt:active { transform: scale(.97); }
.role-av { font-size: 34px; width: 78px; height: 78px; border-radius: 50%;
  background: rgba(148,163,184,.12); display: flex; align-items: center; justify-content: center; }
.role-opt.on { border: 2px solid transparent;
  background: linear-gradient(#0d1830, #0d1830) padding-box, var(--grad) border-box;
  box-shadow: 0 0 24px rgba(47,123,255,.35); }
.role-opt.on .role-av { background: var(--grad); }
.role-opt.on::after { content: "✓"; position: absolute; top: 10px; right: 12px;
  width: 26px; height: 26px; border-radius: 50%; background: var(--grad); color: #fff;
  font-size: 15px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.role-t { font-size: 20px; font-weight: 800; }
.role-d { color: var(--muted); font-size: 13px; }
#btnRoleGo { margin-top: 20px; }

/* Buttons & inputs */
.primary { display: block; width: 100%; background: var(--grad); color: #fff; border: 0;
  border-radius: var(--radius); padding: 16px; font-size: 18px; font-weight: 700;
  min-height: 56px; margin-top: 14px;
  box-shadow: 0 6px 20px rgba(47,123,255,.30); }
.primary:active { transform: scale(.99); }
.primary:disabled { background: #2a3550; box-shadow: none; color: #7b8aa5; }
.primary.off { background: #2a3550; box-shadow: none; color: #7b8aa5; }
.danger { display: block; width: 100%; background: transparent; color: var(--danger);
  border: 2px solid var(--danger); border-radius: var(--radius); padding: 14px;
  font-size: 16px; font-weight: 700; min-height: 52px; margin-top: 14px; }
/* External Google Maps button (anchor styled as a button). */
.extbtn { display: block; width: 100%; box-sizing: border-box; text-align: center;
  background: #0d1830; color: var(--teal); border: 2px solid var(--teal);
  border-radius: var(--radius); padding: 13px; font-size: 16px; font-weight: 700;
  min-height: 52px; margin-top: 12px; text-decoration: none; }
.extbtn[hidden] { display: none; }
.linkbtn { background: none; border: 0; color: var(--teal); font-size: 15px;
  padding: 12px; margin-top: 8px; }
.gbtn { display: inline-flex; align-items: center; gap: 10px; background: #fff;
  border: 1px solid #dadce0; border-radius: 12px; padding: 14px 22px;
  font-size: 17px; font-weight: 600; min-height: 56px; margin-top: 14px; color: #1f2937; }
.glogo { background: #fff; border: 2px solid #4285f4; color: #4285f4; font-weight: 800;
  width: 30px; height: 30px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; }
.big-ico { font-size: 64px; margin-top: 30px; }

.fld { display: block; margin: 14px 0; }
.fld > span:first-child, .flabel { display: block; font-weight: 700; margin-bottom: 6px; font-size: 15px; }
.fld input, .fld select { width: 100%; border: 2px solid var(--line); border-radius: 12px;
  padding: 14px; font-size: 16px; background: var(--card2); color: var(--ink); min-height: 54px;
  transition: border-color .15s ease, box-shadow .15s ease; }
.fld input::placeholder { color: #5b6b8c; }
.fld select option { background: var(--card2); }
.fld input:focus, .fld select:focus { outline: none; border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(34,211,238,.18); }
.fld.inline { display: flex; align-items: center; gap: 10px; }
/* Professional joined phone input: +92 box attached to the number field */
.phone-row { display: flex; gap: 0; align-items: stretch; }
.phone-row .cc { background: #16203a; border: 2px solid var(--line); border-right: none;
  border-radius: 12px 0 0 12px; padding: 0 14px; display: flex; align-items: center;
  font-weight: 800; font-size: 16px; white-space: nowrap; color: var(--teal); }
.phone-row input { flex: 1; border-radius: 0 12px 12px 0; }
.phone-row input:focus { box-shadow: 0 0 0 3px rgba(34,211,238,.18); }
/* Number-plate photo preview + optional tag */
.plate-prev { display: block; max-width: 100%; border-radius: 12px; margin-top: 10px;
  border: 2px solid var(--line); }
.fld .opt { color: var(--muted); font-weight: 400; font-size: 13px; }
/* City rule note (e.g. no rickshaw in Islamabad) + location-required note */
.city-note { background: rgba(255,180,0,.1); border: 1px solid rgba(255,180,0,.35);
  color: #ffd166; border-radius: 12px; padding: 10px 12px; font-size: 13px; margin: 10px 0 0; }
.loc-note { background: rgba(255,90,90,.08); border: 1px solid rgba(255,90,90,.4);
  color: #ff9d9d; border-radius: 12px; padding: 12px; font-size: 14px; margin: 12px 0; }
.loc-note .linkbtn { margin-top: 6px; }
/* Current point address line */
.pt-addr { background: var(--card2); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font-size: 14px; margin-bottom: 8px; }
/* Place search (Nominatim, free) */
.search-inp { width: 100%; border: 2px solid var(--line); border-radius: 12px;
  padding: 13px 14px; font-size: 16px; background: var(--card2); color: var(--ink); }
.search-inp:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(34,211,238,.18); }
.search-results { margin-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.search-results:empty { display: none; }
.sr-item { background: var(--card2); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font-size: 14px; text-align: left; color: var(--ink); }
.sr-item:active { border-color: var(--teal); }
.sr-item small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
/* ===== Mascot guide (uncle) ===== */
.mascot { position: fixed; right: 10px; top: 24%; z-index: 60;
  display: flex; flex-direction: column; align-items: flex-end; }
.mascot[hidden] { display: none; }
.mascot-body { position: relative; width: 78px; height: 78px; cursor: pointer;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.45)); }
.mascot-body:active { transform: scale(.94); }
.m-face { width: 66px; height: 66px; border-radius: 50%; background: #f0c08a;
  border: 3px solid #fff; position: absolute; left: 4px; top: 6px; overflow: hidden; }
.m-cap { position: absolute; top: -2px; left: 6px; right: 6px; height: 22px;
  background: linear-gradient(135deg, #0d9488, #2f7bff); border-radius: 4px 4px 30px 30px; }
.m-eye { position: absolute; top: 28px; width: 8px; height: 11px; background: #232323; border-radius: 50%; }
.m-eye.left { left: 19px; }
.m-eye.right { right: 19px; }
.m-smile { position: absolute; bottom: 12px; left: 21px; right: 21px; height: 13px;
  border-bottom: 4px solid #7c4a21; border-radius: 0 0 30px 30px; }
.m-hand { position: absolute; right: 0; top: 0; font-size: 30px;
  animation: wave 1.4s ease-in-out infinite; transform-origin: bottom center; }
@keyframes wave { 0%,100% { transform: rotate(0deg); } 25% { transform: rotate(22deg); } 75% { transform: rotate(-16deg); } }
.mascot-bubble { background: #fff; color: #14202e; border-radius: 14px; padding: 8px 12px;
  font-size: 13px; line-height: 1.35; max-width: 172px; margin-bottom: 8px; text-align: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.4); position: relative; }
.mascot-bubble:after { content: ""; position: absolute; bottom: -8px; right: 28px;
  border: 8px solid transparent; border-top-color: #fff; border-bottom: 0; }
/* Guide bottom-sheet */
.guide-card { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 70;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 18px 16px 16px; box-shadow: 0 10px 34px rgba(0,0,0,.55);
  max-height: 62vh; overflow-y: auto; }
.guide-card[hidden] { display: none; }
.g-close { position: absolute; top: 8px; right: 10px; background: var(--card2);
  border: 1px solid var(--line); color: var(--ink); border-radius: 50%;
  width: 32px; height: 32px; font-size: 15px; }
.guide-card h3 { margin: 0 0 8px; font-size: 18px; }
.guide-card p { margin: 6px 0; font-size: 15px; }
.g-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.micbtn { width: 78px; height: 78px; border-radius: 50%; font-size: 36px; border: none;
  background: var(--grad); margin: 10px auto; display: block; color: #fff; }
.micbtn.listening { animation: micpulse 1s ease-in-out infinite; }
@keyframes micpulse { 0%,100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(47,123,255,.5); }
  50% { transform: scale(1.1); box-shadow: 0 0 0 14px rgba(47,123,255,0); } }
.g-heard { background: var(--card2); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; min-height: 44px; font-size: 14px; }
/* Moving vehicle on route preview */
.vmove { font-size: 34px; filter: drop-shadow(0 3px 6px rgba(0,0,0,.5)); }
/* Numbered map pins (Google-Maps style) */
.mpin { width: 30px; height: 30px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg);
  display: flex; align-items: center; justify-content: center; color: #fff;
  font-size: 14px; font-weight: 800; border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.mpin span { transform: rotate(45deg); }
/* Stop rows */
.stop-row { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.stop-row .grow { flex: 1; }
.stop-n { width: 30px; height: 30px; border-radius: 50%; background: #f59e0b; color: #fff;
  font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 8px; }
/* Pickup mode toggle (current location vs map pick) */
.pick-toggle { display: flex; gap: 8px; }
.ptab { flex: 1; background: var(--card2); border: 2px solid var(--line); border-radius: 12px;
  padding: 11px 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.ptab:active { transform: scale(.97); }
.ptab.on { border: 2px solid transparent;
  background: linear-gradient(#0d1830, #0d1830) padding-box, var(--grad) border-box;
  color: var(--teal); box-shadow: 0 0 14px rgba(47,123,255,.3); }
/* Driver approval notice (driver panel) */
.appr-note { background: rgba(255,180,0,.1); border: 1px solid rgba(255,180,0,.4);
  color: #ffd166; border-radius: 14px; padding: 14px; font-size: 15px; margin: 12px 0; line-height: 1.6; }

/* Segmented selector — beautiful vehicle tabs with clear selected state */
.seg { display: flex; gap: 10px; }
.seg-btn { flex: 1; background: var(--card2); border: 2px solid var(--line); border-radius: 16px;
  padding: 14px 6px 12px; min-height: 88px; color: var(--ink); position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.seg-btn:active { transform: scale(.97); }
.seg-btn .vico { font-size: 30px; line-height: 1; width: 58px; height: 58px; border-radius: 18px;
  background: rgba(148,163,184,.12); display: flex; align-items: center; justify-content: center; }
.seg-btn small { font-size: 13px; color: var(--muted); font-weight: 700; }
.seg-btn.on .vico { background: var(--grad); }
.seg-btn.on small { color: var(--teal); }
.seg-btn.on { border: 2px solid transparent;
  background: linear-gradient(#0d1830, #0d1830) padding-box, var(--grad) border-box;
  box-shadow: 0 0 20px rgba(47,123,255,.35); }
.seg-btn.on small { color: var(--teal); }
.seg-btn.on::after { content: "✓"; position: absolute; top: 6px; right: 8px;
  width: 22px; height: 22px; border-radius: 50%; background: var(--grad); color: #fff;
  font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; }

/* Map + booking sheet */
.map { height: 44vh; min-height: 280px; width: 100%; background: #0b1220; z-index: 1; }
/* Map load fail → retry UI */
.map-fail { height: 100%; min-height: 280px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; text-align: center;
  background: var(--card); padding: 24px; }
.map-fail p { font-size: 16px; margin: 0; }
.map-fail small { color: var(--muted); font-size: 13px; }
.map-fail .primary { max-width: 300px; }
.map.small { height: 30vh; min-height: 200px; border-radius: var(--radius); }
.sheet { background: var(--card); border-radius: 20px 20px 0 0; margin-top: -18px;
  position: relative; z-index: 2; padding: 8px 16px 30px;
  box-shadow: 0 -4px 24px rgba(0,0,0,.45); border-top: 1px solid var(--line); }
.sheet::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 3px;
  background: #2a3a5e; margin: 6px auto 10px; }
.farebox { background: var(--card2); border: 2px dashed var(--teal); border-radius: var(--radius);
  padding: 14px; margin: 12px 0; text-align: center; }
.fare-amt { font-size: 34px; font-weight: 800;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; }
.fare-meta { color: var(--muted); margin-top: 4px; }
.fare-note { color: var(--green-soft); font-weight: 700; font-size: 13px; margin-top: 8px; }

/* Cards, stats, tables */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin: 12px 0; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.status-pill { display: inline-block; background: #3a2c12; color: #fcd34d; font-weight: 700;
  padding: 10px 18px; border-radius: 30px; margin: 6px 0 4px; font-size: 16px; }
.status-pill.ok { background: #0d2b1d; color: #4ade80; }
.status-pill.warn { background: #3a2c12; color: #fcd34d; }
.status-pill.bad { background: #3a1414; color: #f87171; }
/* Subscription screen */
.trackid { font-size: 30px; font-weight: 800; letter-spacing: 3px; text-align: center;
  background: var(--card2); border: 2px dashed var(--teal); border-radius: var(--radius);
  padding: 14px; margin-top: 8px; color: var(--teal); }
.acct { display: flex; align-items: center; gap: 10px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 8px 0; }
.acct b { flex: 0 0 auto; }
.acct-num { flex: 1; font-weight: 700; font-size: 17px; letter-spacing: 1px; }
.copybtn { background: var(--grad); color: #fff; border: 0; border-radius: 10px;
  padding: 8px 12px; font-weight: 700; min-height: 40px; }
.okbtn { background: var(--green); color: #fff; border: 0; border-radius: 10px;
  padding: 8px 12px; font-weight: 700; min-height: 40px; }
.noobtn { background: var(--danger); color: #fff; border: 0; border-radius: 10px;
  padding: 8px 12px; font-weight: 700; min-height: 40px; }
.walink { color: var(--green-soft); font-weight: 700; }
.stat-row { display: flex; gap: 10px; margin: 14px 0; }
.stat { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 6px; text-align: center; }
.stat-v { display: block; font-size: 19px; font-weight: 800; }
.stat-l { font-size: 12px; color: var(--muted); }
.pill { background: var(--grad); color: #fff; border-radius: 20px; padding: 2px 10px; font-size: 13px; }

.req { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin: 10px 0; border-left: 6px solid var(--teal); }
.req .r-route { font-weight: 700; font-size: 16px; }
.req .r-meta { color: var(--muted); font-size: 14px; margin: 4px 0; }
.req .r-fare { font-size: 22px; font-weight: 800; color: var(--teal); }
.req button { margin-top: 10px; }

.stars { font-size: 40px; letter-spacing: 6px; margin: 8px 0; }
.stars span { cursor: pointer; filter: grayscale(1); opacity: .5; }
.stars span.lit { filter: none; opacity: 1; }

.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.tbl th { background: var(--card2); color: var(--muted); }
.tbl input { width: 70px; padding: 8px; font-size: 15px; background: var(--card2);
  border: 2px solid var(--line); border-radius: 8px; color: var(--ink); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #16203a; color: #fff; border: 1px solid var(--line);
  padding: 14px 20px; border-radius: 12px; z-index: 2000;
  max-width: 90vw; font-size: 15px; box-shadow: 0 4px 16px rgba(0,0,0,.5); }

@media (min-width: 700px) {
  .role-opt { min-height: 230px; }
}

/* Install app popup (bottom sheet, ek dafa) */
.install-pop { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom));
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 16px; z-index: 1500; box-shadow: 0 12px 40px rgba(0,0,0,.6); }
.install-pop[hidden] { display: none; }
.install-x { position: absolute; top: 6px; right: 8px; background: none; border: 0;
  color: var(--muted); font-size: 18px; padding: 10px; min-width: 44px; min-height: 44px; }
.install-logo { width: 56px; height: 56px; border-radius: 14px; float: left; margin: 0 12px 6px 0; }
.install-txt b { display: block; font-size: 17px; margin-bottom: 4px; }
.install-txt span { color: var(--muted); font-size: 13px; }
/* Google-embed map (key-less): iframe + overlay pins/route */
.gmap { position: relative; overflow: hidden; }
.gmap-stage { position: absolute; inset: 0; pointer-events: none; }
.gmap-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
.gmap-route { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.gmap-pins { position: absolute; inset: 0; pointer-events: none; }
.gmap-pinwrap { position: absolute; width: 30px; height: 30px; margin-left: -15px; margin-top: -30px; pointer-events: auto; cursor: pointer; }
.gmap-tap { position: absolute; inset: 0; touch-action: none; cursor: crosshair; }
.gmap-zoom { position: absolute; right: 10px; bottom: 12px; display: flex; flex-direction: column; gap: 8px; z-index: 5; }
.gmap-zoom button { width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(255,255,255,.2); background: rgba(10,16,28,.85); color: #fff; font-size: 22px; font-weight: 800; line-height: 1; }
.gmap-zoom button:active { background: rgba(13,148,136,.9); }
.gmap-pop { position: absolute; z-index: 6; background: #0f172a; border: 1px solid rgba(255,255,255,.16); border-radius: 12px; padding: 10px 12px; color: #fff; text-align: center; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.gmap-pop button { margin-top: 8px; background: #ef4444; color: #fff; border: none; border-radius: 8px; padding: 9px 16px; font-weight: 700; font-size: 14px; }

/* Live tracking compass */
.track-flex{display:flex;gap:14px;align-items:center}
.compass{position:relative;width:110px;height:110px;border-radius:50%;background:radial-gradient(circle at 50% 40%,#16233d,#0a0f1c);border:2px solid #2a3a55;flex:none}
.cdir{position:absolute;font-size:11px;font-weight:800;color:#7ea2d6}
.cdir.n{top:4px;left:50%;transform:translateX(-50%)}
.cdir.s{bottom:4px;left:50%;transform:translateX(-50%)}
.cdir.e{right:6px;top:50%;transform:translateY(-50%)}
.cdir.w{left:6px;top:50%;transform:translateY(-50%)}
#needle{position:absolute;left:50%;top:50%;width:0;height:0;transform-origin:0 0;transition:transform .6s ease}
#needle::before{content:"➤";position:absolute;left:-9px;top:-42px;font-size:22px;color:#ef4444;transform:rotate(-90deg)}
.cdot{position:absolute;left:50%;top:50%;width:10px;height:10px;border-radius:50%;background:#2f7bff;transform:translate(-50%,-50%);box-shadow:0 0 8px #2f7bff}
.track-dist{font-size:20px;font-weight:800}

/* Taxi stand + chat */
.map.tall{height:52vh;min-height:340px;border-radius:14px;border:1px solid #223;overflow:hidden}
.chat-msgs{display:flex;flex-direction:column;gap:8px;min-height:55vh;max-height:calc(100vh - 320px);overflow-y:auto;padding:10px;background:#0a0f1c;border:1px solid #223;border-radius:12px;margin:10px 0;flex:1}
.cmsg{max-width:80%;padding:8px 12px;border-radius:14px;font-size:14px;line-height:1.4}
.cmsg.me{align-self:flex-end;background:#0d9488;color:#fff;border-bottom-right-radius:4px}
.cmsg.them{align-self:flex-start;background:#1a2438;color:#e8eef7;border-bottom-left-radius:4px}
.cmsg .cts{display:block;font-size:10px;opacity:.6;margin-top:4px}
/* WhatsApp-style bot chat messages */
.msg{max-width:82%;padding:10px 14px;border-radius:16px;font-size:14px;line-height:1.5;margin-bottom:6px;word-wrap:break-word;box-shadow:0 1px 2px rgba(0,0,0,.3)}
.msg.me{align-self:flex-end;background:#005c4b;color:#fff;border-bottom-right-radius:4px}
.msg.them{align-self:flex-start;background:#1f2c34;color:#e9edef;border-bottom-left-radius:4px}
.msg.sys{align-self:center;background:#182229;color:#ffd279;border-radius:12px;max-width:92%;text-align:center;font-size:13px;border:1px solid #2a3942}
.msg a{color:#53bdeb;text-decoration:underline}
.msg audio{margin-top:6px;border-radius:8px}
/* Quote action buttons (grey WhatsApp-style) */
.quote-actions{display:flex;gap:10px;justify-content:center;margin:8px 0 12px;align-self:center;max-width:94%}
.quote-actions button{flex:1;background:linear-gradient(135deg,#1a2438,#243447);color:#e9edef;border:1px solid #3a4a5f;border-radius:14px;padding:14px 10px;font-size:15px;cursor:pointer;font-weight:700;box-shadow:0 3px 10px rgba(0,0,0,.3);transition:all .2s}
.quote-actions button:active{transform:scale(.96)}
.quote-actions button[data-c='yes']{background:linear-gradient(135deg,#005c4b,#008069);border-color:#00a884;color:#fff}
.quote-actions button[data-c='no']{background:linear-gradient(135deg,#3d2b2b,#5a2a2a);border-color:#ff6b6b;color:#fff}
.quote-actions button[data-b='book']{background:linear-gradient(135deg,#005c4b,#00a884);border-color:#00a884;color:#fff;font-size:16px;padding:16px 10px}
.quote-actions button[data-b='reject']{background:linear-gradient(135deg,#2a2a2a,#3d3d3d);border-color:#5a5a5a;color:#e9edef}
.quote-actions button[data-v]{background:linear-gradient(135deg,#1a2438,#243447);border:1px solid #3a4a5f}
.quote-actions button[data-act='accept']{background:#005c4b;border-color:#00695c}
.quote-actions button[data-act='reject']{background:#3d2b2b;border-color:#5a3a3a}
/* Professional icon buttons (SVG, WhatsApp-style) */
.iconbtn{background:#1f2c34;border:none;color:#8696a0;border-radius:50%;width:46px;height:46px;display:flex;align-items:center;justify-content:center;cursor:pointer;flex-shrink:0;transition:all .2s;box-shadow:0 2px 6px rgba(0,0,0,.3)}
.iconbtn:active{transform:scale(.92)}
.iconbtn svg{width:24px;height:24px}
.loc-btn{color:#00a884;background:#1f2c34}
.loc-btn.loading{animation:spin 1s linear infinite;color:#00a884}
.voice-btn{color:#8696a0}
.voice-btn.recording{background:#ff3b30;color:#fff;animation:pulse 1.5s infinite}
.chat-inputrow .primary{background:#00a884;border:none;color:#fff;box-shadow:0 2px 8px rgba(0,168,132,.4);border-radius:50%}
.chat-inputrow .primary:active{transform:scale(.92)}
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.6}}
.stand-dcard b{font-size:16px}

/* AI chatbot */
.bot-header{display:flex;gap:12px;align-items:center;padding:12px;background:#0f1626;border:1px solid #223;border-radius:14px;margin-bottom:10px}
.bot-avatar{width:48px;height:48px;border-radius:50%;background:linear-gradient(135deg,#2f7bff,#0d9488);display:flex;align-items:center;justify-content:center;font-size:26px;flex:none}
.bot-msgs{min-height:40vh;display:flex;flex-direction:column;gap:4px;padding:12px;background:#0b141a;border-radius:12px;overflow-y:auto;max-height:55vh}
.bmsg{max-width:85%;padding:10px 14px;border-radius:16px;font-size:14px;line-height:1.5;margin-bottom:4px;word-wrap:break-word}
.bmsg.bot{align-self:flex-start;background:#1a2438;color:#e8eef7;border-bottom-left-radius:4px;margin-right:auto}
.bmsg.user{align-self:flex-end;background:#0d9488;color:#fff;border-bottom-right-radius:4px;margin-left:auto}
.bmsg .typing{display:inline-block}
.bmsg .typing span{display:inline-block;width:6px;height:6px;border-radius:50%;background:#7ea2d6;margin:0 2px;animation:tblink 1.2s infinite}
.bmsg .typing span:nth-child(2){animation-delay:.2s}
.bmsg .typing span:nth-child(3){animation-delay:.4s}
/* Chat input row — WhatsApp style */
.chat-inputrow{display:flex;gap:8px;align-items:center;padding:8px;background:#0a0f1c;border-top:1px solid #223;width:100%;box-sizing:border-box}
.chat-inputrow input{flex:1 1 auto;min-width:0;width:auto;max-width:100%;height:56px;min-height:56px;padding:0 20px;border-radius:28px;border:none;background:#ffffff;color:#111;font-size:16px;outline:none;box-sizing:border-box;box-shadow:0 1px 3px rgba(0,0,0,.2);margin:0}
.chat-inputrow input::placeholder{color:#8696a0}
.chat-inputrow input:focus{box-shadow:0 1px 5px rgba(0,0,0,.3)}
.chat-inputrow .iconbtn{flex:0 0 auto;width:56px;height:56px;display:flex;align-items:center;justify-content:center}
.chat-inputrow .primary{flex:0 0 auto;width:56px;height:56px;min-width:56px;min-height:56px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#00a884,#008069);border:none;color:#fff;box-shadow:0 3px 12px rgba(0,168,132,.5);border-radius:50%;padding:0;margin:0}
.chat-inputrow .primary svg{width:26px;height:26px;flex-shrink:0}
.chat-inputrow .primary:active{transform:scale(.92)}
/* Mobile: ensure input doesn't collapse */
@media (max-width:600px){
  .chat-inputrow{gap:8px;padding:10px 8px}
  .chat-inputrow input{height:52px;padding:0 18px;font-size:15px}
  .chat-inputrow .iconbtn,.chat-inputrow .primary{width:52px;height:52px}
}
@keyframes tblink{0%,60%,100%{opacity:.3}30%{opacity:1}}
.drv-card{background:#0f1626;border:1px solid #2a3a55;border-radius:12px;padding:10px;margin:8px 0}
.drv-card .dc-head{display:flex;justify-content:space-between;align-items:center}
.drv-card .dc-fare{font-size:18px;font-weight:800;color:#22c55e}

/* Voice messages */
.voicebtn{background:#1a2438;border:1px solid #2a3a55;border-radius:10px;font-size:20px;padding:8px 12px;cursor:pointer;flex:none}
.voicebtn.rec{background:#ef4444;border-color:#ef4444;animation:vpulse 1s infinite}
@keyframes vpulse{0%,100%{opacity:1}50%{opacity:.6}}
.voicemsg{display:flex;align-items:center;gap:8px}
.voicemsg .vplay{background:#0d9488;border:0;border-radius:50%;width:36px;height:36px;font-size:16px;cursor:pointer;color:#fff;flex:none}
.voicemsg .vdur{font-size:12px;opacity:.7}

/* 3-dots menu */
.menu-wrap{position:relative}
.menu-btn{font-size:20px;font-weight:900;padding:6px 12px;letter-spacing:2px}
.menu-drop{position:absolute;top:100%;right:0;background:#1a2438;border:1px solid #3a4a5f;border-radius:12px;min-width:120px;box-shadow:0 4px 16px rgba(0,0,0,.5);z-index:1000;overflow:hidden}
.menu-item{display:block;width:100%;padding:12px 16px;background:none;border:none;color:#e9edef;font-size:14px;text-align:left;cursor:pointer}
.menu-item:active{background:#243447}

/* FIX: Horizontal shake/move band — poori app mobile mein fit */
html, body { overflow-x: hidden; max-width: 100vw; }
.screen { overflow-x: hidden; max-width: 100vw; }
.wrap { max-width: 100vw; overflow-x: hidden; box-sizing: border-box; }
.chat-msgs, .bot-msgs { max-width: 100%; overflow-x: hidden; }
.chat-inputrow { max-width: 100vw; overflow-x: hidden; }
/* Koi bhi element screen se bahar na jaye */
img, svg, video { max-width: 100%; }

/* Message ticks + time — WhatsApp jaisa, bubble ke andar */
.bmsg { position:relative; }
.msg-meta { float:right; font-size:11px; color:#8696a0; margin:8px 0 0 8px; line-height:1; font-weight:400; }
.msg-meta .ticks { font-weight:300; letter-spacing:-2px; color:#8696a0; }
.msg-meta .ticks.read { color:#53bdeb; }
/* Customer bubble — WhatsApp green */
.bmsg.user { background:#005c4b !important; }
/* Assistant ka time blue */
.bmsg.bot .msg-meta { color:#53bdeb; }
/* Button rows mein ticks NAHI */
.quote-actions .msg-meta { display:none !important; }
.bmsg::after { content:""; display:table; clear:both; }
