:root{
  --navy:#020923; --navy2:#0e1a4d; --orange:#ff7a1a; --orange2:#ff9a4d;
  --bg:#f3f6fb; --ink:#14213d; --muted:#6b778c; --line:#e6ebf3;
  --ok:#18a058; --bad:#d64545; --warn:#e8a317;
}
*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html,body{height:100%}
body{font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:var(--ink);background:#e9eef7;display:flex;justify-content:center;align-items:center;font-size:14px}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer;border:0;background:none}
img{max-width:100%}

/* ---- phone frame ---- */
.phone{width:100%;height:100vh;height:100dvh;background:var(--navy);display:flex;flex-direction:column;position:relative;overflow:hidden}
@media(min-width:560px){
  body{padding:20px;background:radial-gradient(circle at 20% 10%,#dbe6fb,#c9d6ee 60%,#b9c8e6)}
  .phone{width:410px;height:min(880px,calc(100dvh - 40px));border-radius:38px;border:8px solid #0a1a38;box-shadow:0 30px 80px rgba(11,42,91,.4)}
}
#app{flex:1;min-height:0;display:flex;flex-direction:column}
.demo-banner{background:var(--orange);color:#fff;font-size:11px;font-weight:600;text-align:center;padding:5px 10px;line-height:1.3}
.screen{flex:1;min-height:0;display:flex;flex-direction:column;background:var(--navy)}
.screen.light{background:#fff}
.screen.fill{background:linear-gradient(170deg,#0d3270,#071c42)}

/* ---- header + sheet ---- */
.top{display:flex;align-items:center;gap:10px;padding:14px 18px 16px;color:#fff;min-height:64px}
.top h1{font-size:18px;font-weight:600;flex:1}
.top-right{margin-left:auto;display:flex;gap:10px;align-items:center}
.icon-btn{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:18px}
.avatar{width:36px;height:36px;border-radius:50%;background:#fff;color:var(--navy);font-weight:700;display:grid;place-items:center}
.content{flex:1;min-height:0;overflow-y:auto;background:#fff;border-radius:26px 26px 0 0;padding:18px 16px 24px}
.content.pad0{padding:0}
.lighttop{display:flex;align-items:center;gap:8px;padding:14px 12px 4px}
.lighttop .icon-btn{color:var(--navy);background:var(--bg)}
.lighttop h1{font-size:18px}

/* ---- logo ---- */
.logo{display:flex;flex-direction:column;align-items:center;color:#fff;line-height:1}
.logo img{display:block;width:210px;max-width:70vw;height:auto;border-radius:18px}
.logo.xl img{width:280px}
.logo.sm{flex-direction:row;gap:7px;align-items:center}.logo.sm .lmark{height:30px;width:auto}.logo.sm .lword{height:20px;width:auto}

/* ---- splash / welcome ---- */
.center{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;color:#fff;text-align:center;padding:30px}
.center .tag{font-size:15px;opacity:.95}
.center .tag i{color:var(--orange);font-style:normal;margin:0 6px}
.rider-emoji{font-size:86px;filter:drop-shadow(0 10px 18px rgba(0,0,0,.35))}
.dots{display:flex;gap:6px}.dots i{width:22px;height:4px;border-radius:2px;background:#fff;opacity:.5}.dots i:first-child{background:var(--orange);opacity:1}
.welcome-body{padding:6px 22px 22px;flex:1;display:flex;flex-direction:column}
.welcome-body h2{font-size:28px;margin-top:20px}
.welcome-body p.sub{color:var(--muted);margin:4px 0 20px}
.opt{display:flex;align-items:center;gap:14px;padding:16px;border:1px solid var(--line);border-radius:18px;margin-bottom:14px;background:#fff;box-shadow:0 2px 8px rgba(11,42,91,.05);width:100%;text-align:left}
.opt .ic{width:48px;height:48px;border-radius:50%;background:var(--navy);color:#fff;display:grid;place-items:center;font-size:22px;flex:none}
.opt b{display:block;font-size:16px}.opt small{color:var(--muted)}.opt .chev{margin-left:auto;color:var(--muted);font-size:20px}
.opt.sel{border-color:var(--orange);background:#fff7f0}
.skyline{margin-top:auto;text-align:center;font-size:12px;color:var(--muted);padding-top:20px}

/* ---- forms ---- */
.field{margin-bottom:12px}
.field label{display:block;font-size:12px;font-weight:600;color:var(--muted);margin-bottom:5px}
.input,.field input,.field select,.field textarea{width:100%;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:#fff;outline:none}
.field textarea{min-height:72px;resize:vertical}
.field input:focus,.field select:focus,.field textarea:focus,.search input:focus{border-color:var(--orange);box-shadow:0 0 0 3px rgba(255,122,26,.15)}
.field .hint{font-size:11px;color:var(--muted);margin-top:4px}
.row2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.btn{display:block;width:100%;padding:14px;border-radius:12px;font-weight:700;text-align:center;font-size:15px;transition:.15s}
.btn.orange{background:var(--orange);color:#fff;box-shadow:0 6px 14px rgba(255,122,26,.3)}
.btn.orange:active{transform:scale(.99)}
.btn.navy{background:var(--navy);color:#fff}
.btn.ghost{background:var(--bg);color:var(--navy)}
.btn.red{background:#fdeaea;color:var(--bad)}
.btn.sm{display:inline-block;width:auto;padding:9px 14px;font-size:13px;border-radius:10px}
.btn:disabled{opacity:.6;cursor:wait}
.btns{display:flex;gap:8px;margin-top:10px}.btns .btn{flex:1}
.link{color:var(--orange);font-weight:700}
.center-text{text-align:center;color:var(--muted);margin-top:16px}
.search{margin-bottom:14px}
.search input{width:100%;padding:12px 14px 12px 40px;border:1px solid var(--line);border-radius:14px;background:var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%236b778c' stroke-width='2'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='m13 13 4 4'/%3E%3C/svg%3E") 13px center no-repeat;outline:none}

/* ---- home ---- */
.loc{display:flex;gap:10px;align-items:center;padding:10px 12px;border:1px solid var(--line);border-radius:14px;margin-bottom:12px}
.loc small{display:block;color:var(--muted);font-size:11px}.loc b{font-size:13px}
.banner{background:linear-gradient(120deg,#0b1445,#27399a);border-radius:16px;padding:16px;color:#fff;margin:4px 0 16px;position:relative;overflow:hidden}
.banner h3{color:var(--orange2);font-size:16px}.banner h4{font-size:19px;margin:2px 0 6px;max-width:72%}.banner p{font-size:11px;opacity:.8}
.banner .big{position:absolute;right:10px;bottom:2px;font-size:62px}
.grid4{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:18px}
.tile{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 4px;border:1px solid var(--line);border-radius:14px;background:#fff;font-size:11px;color:var(--muted);box-shadow:0 2px 6px rgba(11,42,91,.04)}
.tile span{font-size:24px}.tile:active{background:var(--bg)}
.row-h{display:flex;justify-content:space-between;align-items:center;margin:4px 0 10px}.row-h h3{font-size:16px}.row-h a{color:var(--orange);font-size:12px;font-weight:600}
.hscroll{display:flex;gap:10px;overflow-x:auto;padding-bottom:8px;scrollbar-width:none}.hscroll::-webkit-scrollbar{display:none}
.pcard{flex:none;width:118px}
.pcard .thumb{height:78px;border-radius:12px}.pcard b{display:block;font-size:12px;margin-top:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pcard small{color:var(--muted);font-size:11px}

/* ---- cards / lists ---- */
.thumb{position:relative;background:linear-gradient(135deg,#fff1e4,#ffe0c4);border-radius:12px;display:grid;place-items:center;font-size:32px;overflow:hidden;flex:none}
.thumb img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.vcard{display:flex;gap:12px;padding:10px;border:1px solid var(--line);border-radius:16px;margin-bottom:12px;background:#fff;box-shadow:0 2px 8px rgba(11,42,91,.04)}
.vcard .thumb{width:74px;height:74px}
.vcard b{font-size:15px}.vcard .meta{color:var(--muted);font-size:12px;margin:2px 0}
.vcard .free{color:#1b6fd1;font-size:11px;font-weight:600}
.vcard.closed{opacity:.55}
.star{color:var(--warn);font-weight:700}
.chips{display:flex;gap:8px;overflow-x:auto;margin:0 0 14px;padding-bottom:2px;scrollbar-width:none}.chips::-webkit-scrollbar{display:none}
.chip{flex:none;padding:8px 16px;border-radius:20px;background:var(--bg);color:var(--muted);font-weight:600;font-size:13px;border:1px solid var(--line)}
.chip.active{background:var(--navy);color:#fff;border-color:var(--navy)}
.empty{text-align:center;color:var(--muted);padding:40px 20px}.empty span{display:block;font-size:46px;margin-bottom:8px}
.cover{padding:0 18px 18px;color:#fff}
.cover h2{font-size:22px}.cover p{opacity:.8;font-size:13px;margin-top:2px}
.infobar{display:flex;gap:14px;font-size:12px;color:var(--muted);flex-wrap:wrap;margin-bottom:12px}
.notice{padding:12px 14px;border-radius:12px;background:#fff6e5;color:#8a5b00;font-size:13px;margin-bottom:12px}
.notice.bad{background:#fdeaea;color:var(--bad)}.notice.ok{background:#e6f7ee;color:var(--ok)}
.sec{font-weight:700;margin:14px 0 8px;font-size:15px}

/* ---- products ---- */
.prod{display:flex;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid var(--line)}
.prod .thumb{width:60px;height:60px;font-size:28px}
.prod .info{flex:1;min-width:0}.prod b{font-size:14px}.prod p{color:var(--muted);font-size:12px;margin:1px 0}.prod .price{font-weight:700}
.plus{width:34px;height:34px;border-radius:10px;background:var(--navy);color:#fff;font-size:20px;display:grid;place-items:center}
.plus.off{background:#ccd3df}
.qty{display:flex;align-items:center;gap:8px;background:var(--bg);border-radius:10px;padding:3px}
.qty button{width:30px;height:30px;border-radius:8px;background:#fff;font-weight:700;font-size:16px;color:var(--navy);box-shadow:0 1px 3px rgba(0,0,0,.08)}
.qty b{min-width:18px;text-align:center}
.soldout{font-size:11px;color:var(--bad);font-weight:700}
.cartbar{position:sticky;bottom:0;margin-top:14px;display:flex;justify-content:space-between;align-items:center;padding:14px 16px;background:var(--orange);color:#fff;border-radius:14px;font-weight:700;box-shadow:0 8px 20px rgba(255,122,26,.35)}

/* ---- summary / receipts ---- */
.sum{background:var(--bg);border-radius:14px;padding:14px;margin:12px 0}
.sum div{display:flex;justify-content:space-between;padding:4px 0}
.sum .total{border-top:1px dashed #cdd5e3;margin-top:6px;padding-top:10px;font-weight:800;font-size:16px}.sum .total span:last-child{color:var(--orange)}
.pay{display:flex;align-items:center;gap:10px;padding:13px;border:1px solid var(--line);border-radius:12px;margin-bottom:8px}
.pay input{width:auto}.pay.off{opacity:.5}
.pay small{margin-left:auto;color:var(--muted);font-size:11px}

/* ---- orders ---- */
.ocard{display:block;border:1px solid var(--line);border-radius:16px;padding:14px;margin-bottom:12px;background:#fff;box-shadow:0 2px 8px rgba(11,42,91,.04)}
.ocard .h{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:6px}
.ocard .h b{font-size:15px}.ocard p{color:var(--muted);font-size:12px;margin:2px 0}.ocard .items{color:var(--ink);font-size:13px;margin:6px 0}
.ocard .money{font-weight:800}
.pill{display:inline-block;padding:4px 10px;border-radius:20px;font-size:11px;font-weight:700;background:#e8eefb;color:var(--navy);white-space:nowrap}
.pill.placed{background:#fff2e0;color:#b86500}.pill.accepted,.pill.preparing{background:#e8f0ff;color:#1b5bd1}
.pill.ready{background:#efe8ff;color:#6b3bd1}.pill.on_the_way{background:#ffe9d9;color:#d1560a}
.pill.delivered{background:#e3f6ec;color:var(--ok)}.pill.cancelled{background:#fdeaea;color:var(--bad)}
.tl{list-style:none;margin:6px 0 4px 6px;border-left:2px solid var(--line)}
.tl li{position:relative;padding:0 0 18px 22px;color:var(--muted);font-weight:500}
.tl li i{position:absolute;left:-8px;top:0;width:14px;height:14px;border-radius:50%;background:#fff;border:2px solid #cdd5e3}
.tl li.done{color:var(--ink)}.tl li.done i{background:var(--navy);border-color:var(--navy)}
.tl li.now{color:var(--orange);font-weight:800}.tl li.now i{background:var(--orange);border-color:var(--orange);box-shadow:0 0 0 5px rgba(255,122,26,.2)}
.hero{background:var(--navy);color:#fff;border-radius:18px;padding:18px;text-align:center;margin-bottom:14px}
.hero .big{font-size:44px}.hero h3{margin-top:4px}.hero p{opacity:.8;font-size:12px;margin-top:2px}
.rider-card{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid var(--line);border-radius:14px;margin:12px 0}
.rider-card .av{width:46px;height:46px;border-radius:50%;background:var(--navy);color:#fff;display:grid;place-items:center;font-size:22px}
.rider-card .call{margin-left:auto;width:40px;height:40px;border-radius:50%;background:#e8f0ff;display:grid;place-items:center;font-size:18px}
.route{border:1px solid var(--line);border-radius:14px;padding:12px;margin:10px 0}
.route div{display:flex;gap:10px;padding:5px 0;align-items:flex-start}.route small{color:var(--muted);display:block;font-size:11px}
.route a{color:#1b6fd1;font-size:12px;font-weight:600}

/* ---- package ---- */
.sizes{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-bottom:12px}
.size{border:1px solid var(--line);border-radius:12px;padding:10px 4px;text-align:center;font-size:11px;color:var(--muted);cursor:pointer;display:block}
.size span{display:block;font-size:22px;margin-bottom:2px}.size b{display:block;color:var(--ink);font-size:12px}
.size input{display:none}.size:has(input:checked){border-color:var(--orange);background:#fff4ea}
.price-line{display:flex;justify-content:space-between;align-items:center;background:var(--bg);border-radius:12px;padding:12px 14px;margin:10px 0;font-weight:700}
.price-line span:last-child{color:var(--orange);font-size:18px}

/* ---- dashboards ---- */
.stats{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:14px}
.stat{background:var(--bg);border-radius:14px;padding:12px}.stat small{color:var(--muted)}.stat b{display:block;font-size:20px;margin-top:2px}
.switch-row{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-radius:14px;background:var(--bg);margin-bottom:14px}
.switch-row b{display:block}.switch-row small{color:var(--muted)}
.switch{width:50px;height:28px;border-radius:14px;background:#c5cddc;position:relative;flex:none;transition:.2s}
.switch::after{content:"";position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;transition:.2s;box-shadow:0 1px 3px rgba(0,0,0,.25)}
.switch.on{background:var(--ok)}.switch.on::after{left:25px}
.mrow{display:flex;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid var(--line)}
.mrow .thumb{width:54px;height:54px;font-size:26px}.mrow .info{flex:1;min-width:0}.mrow b{font-size:14px}.mrow small{color:var(--muted)}
.mrow .acts{display:flex;gap:6px}.mrow .acts button{width:32px;height:32px;border-radius:9px;background:var(--bg)}
.badge-count{background:var(--orange);color:#fff;border-radius:10px;font-size:11px;padding:1px 7px;margin-left:6px}

/* ---- tab bar ---- */
.tabbar{display:flex;background:var(--navy);padding:8px 6px calc(8px + env(safe-area-inset-bottom))}
.tabbar a{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;color:#9fb2d6;font-size:11px;padding:4px 0}
.tabbar a span{font-size:20px;filter:grayscale(1) brightness(1.6);opacity:.8}
.tabbar a.active{color:var(--orange)}.tabbar a.active span{filter:none;opacity:1}

/* ---- modal / toast ---- */
.modal{position:absolute;inset:0;background:rgba(7,20,45,.55);display:flex;align-items:flex-end;z-index:20}
.modal .sheet{background:#fff;width:100%;border-radius:24px 24px 0 0;padding:20px 18px 24px;max-height:92%;overflow-y:auto}
.modal .sheet h3{margin-bottom:12px}
#toasts{position:absolute;left:0;right:0;top:70px;display:flex;flex-direction:column;align-items:center;gap:8px;pointer-events:none;z-index:50}
.toast{background:#0a1a38;color:#fff;padding:11px 16px;border-radius:12px;font-size:13px;max-width:88%;text-align:center;box-shadow:0 8px 24px rgba(0,0,0,.3);animation:pop .25s}
@keyframes pop{from{opacity:0;transform:translateY(-8px)}}
.spin{display:grid;place-items:center;padding:60px;color:var(--muted)}

/* ---- live version additions ---- */
.mapbox{height:210px;border-radius:14px;overflow:hidden;border:1px solid var(--line);background:var(--bg);position:relative;z-index:0}
.mapbox.tall{height:260px;margin-bottom:6px}
.maptools{display:flex;gap:6px;margin-top:6px;flex-wrap:wrap}.maptools input{flex:1;min-width:120px;padding:9px 12px;border:1px solid var(--line);border-radius:10px}
.cover-img{width:100%;height:130px;object-fit:cover;border-radius:14px;margin-bottom:10px}
.thumb.big{width:74px;height:74px}
.rider-card img.av{object-fit:cover;width:46px;height:46px;border-radius:50%}
.codebox{background:#fff4ea;border:2px dashed var(--orange);border-radius:14px;padding:12px;text-align:center;margin:10px 0}
.codebox small{display:block;color:#8a4b00;font-size:11px}.codebox b{font-size:32px;letter-spacing:10px;color:var(--navy)}
.bankcard{background:var(--navy);color:#fff;border-radius:14px;padding:14px;margin:8px 0;display:flex;flex-direction:column;gap:2px}
.bankcard small{opacity:.7}.bankcard b{font-size:24px;letter-spacing:2px}.bankcard .btn{margin-top:8px;align-self:flex-start}
.steps{padding-left:20px;margin-bottom:14px}.steps li{margin-bottom:10px;line-height:1.4}
.refcode{background:#fff4ea;color:var(--orange);padding:2px 8px;border-radius:6px;letter-spacing:1px}
.leaflet-container{font:inherit}.leaflet-pane{z-index:1!important}.leaflet-top,.leaflet-bottom{z-index:2!important}

/* ---- v2 additions ---- */
.tabbar a{position:relative}.bdg{position:absolute;top:0;right:18%;background:#e53935;color:#fff;border-radius:9px;font-size:10px;font-style:normal;font-weight:700;padding:0 5px;min-width:16px;text-align:center;line-height:16px;display:none}
.legalbox{max-height:170px;overflow-y:auto;border:1px solid var(--line);border-radius:12px;padding:12px;font-size:12px;line-height:1.5;background:#fafbfd;margin-bottom:10px}
.legaltext{font-size:14px;line-height:1.6;padding:4px 2px 30px}
.agree{display:flex;gap:10px;align-items:flex-start;font-size:13px;margin:8px 0 12px}.agree input{width:22px;height:22px;flex:none;margin-top:1px}
.attn{display:flex;gap:8px;align-items:center;padding:12px 14px;border-radius:12px;background:#fff1e6;border:1px solid #ffd2b0;margin-bottom:8px;font-size:13px}.attn b{background:var(--orange);color:#fff;border-radius:10px;padding:1px 9px}.attn span{margin-left:auto}
.kyc-imgs{display:grid;grid-template-columns:1fr 1fr;gap:8px}.kyc-imgs figure{margin:0}.kyc-imgs img{width:100%;border-radius:10px;border:1px solid var(--line)}.kyc-imgs figcaption{font-size:11px;color:var(--muted);margin-top:2px}
.kv{display:flex;justify-content:space-between;gap:10px;padding:5px 0;border-bottom:1px solid var(--line);font-size:13px}.kv span:first-child{color:var(--muted)}
details.kycup summary{cursor:pointer;margin:6px 0}textarea.tall{min-height:200px;font-size:12px;line-height:1.4}

/* ---- v3: map search suggestions, mode rows ---- */
.sugg{background:#fff;border:1px solid var(--line);border-radius:12px;margin-top:6px;overflow:hidden;box-shadow:0 6px 18px rgba(2,9,35,.12)}
.sugg button{display:flex;gap:8px;width:100%;text-align:left;padding:11px 12px;border:0;border-bottom:1px solid var(--line);background:#fff;font:inherit;font-size:13px;color:var(--ink);cursor:pointer}
.sugg button:last-child{border-bottom:0}.sugg button:hover,.sugg button:active{background:#fff4e8}
.sugg[hidden]{display:none}
.notice.ok{background:#e8f7ee;color:#0d6b3a}

.kv{display:block !important;margin:8px 0;font-size:13px;line-height:1.5}.kv>div{display:block;margin:3px 0;word-break:break-word}
