:root{
    --bg:#0b0e13; --panel:#131824; --panel2:#1a2233; --line:#26314a;
    --txt:#eef2ff; --mut:#9aa7c2; --acc:#22e584; --acc2:#3aa0ff;
    --warn:#ffb020; --danger:#ff5d5d; --jiku:#22e584;
    --radius:14px;
  }
  *{box-sizing:border-box}
  html{color-scheme:dark}
  body{
    margin:0; background:var(--bg); color:var(--txt);
    font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
    text-align:left;
  }
  a{color:var(--acc2)}
  #topbar{
    position:sticky; top:0; z-index:1200;
    display:flex; align-items:center; gap:10px; flex-wrap:wrap;
    padding:10px 14px; background:rgba(11,14,19,.92);
    border-bottom:1px solid var(--line); backdrop-filter:blur(8px);
  }
  .logo{display:flex; align-items:center; gap:10px; font-weight:800; letter-spacing:.2px}
  .logoMark{
    width:38px; height:40px; display:grid; place-items:center;
    background:linear-gradient(180deg,#22e584,#3aa0ff); color:#04120a; font-weight:900; font-size:20px;
    clip-path:polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  }
  .logo small{display:block; font-weight:500; color:var(--mut); font-size:11px; letter-spacing:.4px}
  .spacer{flex:1}
  .pill{
    display:inline-flex; align-items:center; gap:8px;
    background:var(--panel); border:1px solid var(--line); color:var(--txt);
    border-radius:999px; padding:6px 10px; font-size:13px;
  }
  .dot{width:9px;height:9px;border-radius:50%;background:#555}
  .dot.on{background:var(--acc); box-shadow:0 0 10px var(--acc)}
  button{
    background:var(--acc); color:#04120a; border:0; border-radius:10px;
    padding:10px 14px; font-weight:700; cursor:pointer; font-size:14px;
  }
  button.ghost{background:var(--panel2); color:var(--txt); border:1px solid var(--line)}
  button.danger{background:var(--danger); color:#fff}
  button:disabled{opacity:.5; cursor:not-allowed}
  button.small{padding:7px 10px; font-size:13px; border-radius:8px}
  #layout{
    display:grid; grid-template-columns:360px 1fr 340px; gap:12px;
    padding:12px; max-width:1500px; margin:0 auto; align-items:start;
  }
  .card{
    background:linear-gradient(180deg,var(--panel),#101624);
    border:1px solid var(--line); border-radius:var(--radius); padding:14px;
  }
  .card h3{margin:0 0 8px; font-size:15px}
  .card h2{margin:0 0 6px; font-size:18px}
  .mut{color:var(--mut); font-size:13px; line-height:1.5}
  .row{display:flex; gap:8px; align-items:center}
  .grow{flex:1}
  .tabs{display:flex; gap:6px; flex-wrap:wrap; margin:8px 0}
  .tabs button{flex:1; white-space:nowrap}
  .tabs button.active{outline:2px solid #fff2}
  label{font-size:12px; color:var(--mut); display:block; margin:10px 0 4px}
  select,input,textarea{
    width:100%; background:#0d1320; color:var(--txt);
    border:1px solid var(--line); border-radius:10px; padding:10px;
    font-size:14px; outline:none;
  }
  select:focus,input:focus{border-color:var(--acc2)}
  .quote{
    background:#0d1320; border:1px dashed var(--line); border-radius:10px;
    padding:10px; margin-top:10px; font-size:13px; line-height:1.6;
  }
  .quote b{color:var(--acc)}
  #mapWrap{position:relative; border-radius:var(--radius); overflow:hidden; border:1px solid var(--line); background:#0e1420; min-height:560px}
  #cityMap{width:100%; height:640px; background:#0b0f16; z-index:0;}
  #cityMap.leaflet-container{font-family:inherit}
  .drv{
    width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font-size:16px;
    background:#1a2233;border:2px solid #3aa0ff;box-shadow:0 2px 10px #000a;
  }
  .drv.me{background:#22e584;border-color:#fff}
  .jiku-div{background:none;border:0}
  .pinDot{width:16px;height:16px;border-radius:50%;border:2px solid #fff;box-shadow:0 2px 8px #000a}
  #mapHud{
    position:absolute; left:10px; top:10px; z-index:800; display:flex; gap:8px; flex-wrap:wrap; max-width:calc(100% - 20px);
  }
  .hudChip{
    background:rgba(10,15,25,.88); border:1px solid var(--line); border-radius:999px;
    padding:6px 10px; font-size:12px; display:flex; gap:6px; align-items:center;
  }
  #mapLegend{
    position:absolute; right:10px; bottom:10px; z-index:800; background:rgba(10,15,25,.9);
    border:1px solid var(--line); border-radius:10px; padding:8px 10px; font-size:12px; color:var(--mut);
  }
  #trackCard{
    position:absolute; left:10px; bottom:10px; right:10px; max-width:560px; z-index:800;
    background:rgba(13,20,33,.96); border:1px solid var(--line); border-radius:12px; padding:10px 12px;
    display:none;
  }
  #trackCard.show{display:block}
  .progress{height:8px; background:#0b0f18; border-radius:99px; overflow:hidden; border:1px solid var(--line); margin:8px 0}
  .progress > div{height:100%; background:linear-gradient(90deg,var(--acc),var(--acc2)); width:0%}
  .timeline{display:flex; gap:6px; font-size:11px; color:var(--mut); flex-wrap:wrap}
  .timeline .done{color:var(--acc)}
  .job{
    border:1px solid var(--line); border-radius:12px; padding:10px; margin:8px 0; background:#0e1524;
  }
  .job .pay{color:var(--acc); font-weight:800}
  .job .meta{font-size:12px; color:var(--mut)}
  .statGrid{display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:10px 0}
  .stat{background:#0d1320; border:1px solid var(--line); border-radius:10px; padding:10px}
  .stat .v{font-size:20px; font-weight:800}
  .stat .k{font-size:11px; color:var(--mut)}
  table{width:100%; border-collapse:collapse; font-size:12px}
  th,td{text-align:left; padding:7px 6px; border-bottom:1px solid var(--line); vertical-align:top}
  th{color:var(--mut); font-weight:600; font-size:11px; text-transform:uppercase; letter-spacing:.5px}
  /* incoming delivery request — full-screen takeover, impossible to miss */
  #offerBackdrop{
    position:fixed; inset:0; background:rgba(2,6,12,.84); z-index:2000; display:none;
    align-items:center; justify-content:center; padding:16px;
    backdrop-filter:blur(3px);
  }
  #offerBackdrop.show{display:flex}
  #offerCard{
    width:min(560px,100%); background:#101725; border:2px solid var(--acc);
    border-radius:22px; padding:22px;
    box-shadow:0 0 0 6px #22e58422, 0 24px 80px #000c;
    animation:slideUp .25s ease, offerPulse 1.6s ease-in-out infinite;
    max-height:calc(100vh - 32px); overflow:auto;
  }
  @keyframes slideUp{from{transform:translateY(30px); opacity:0}to{transform:none; opacity:1}}
  @keyframes offerPulse{0%,100%{box-shadow:0 0 0 6px #22e58422,0 24px 80px #000c}50%{box-shadow:0 0 0 14px #22e58438,0 24px 80px #000c}}
  #offerTimer{width:64px;height:64px}
  #offerPayHero{font-size:44px; font-weight:900; color:var(--acc); line-height:1.05; white-space:nowrap}
  #offerPayHero small{font-size:12px; color:var(--mut); font-weight:500; display:block; white-space:normal}
  .offerRoute{background:#0b111d; border:1px solid var(--line); border-radius:12px; padding:12px; margin:12px 0; font-size:15px}
  .offerRoute .p{display:flex; gap:8px; margin:6px 0}
  #offerBtnRow{display:flex; gap:10px; margin-top:12px}
  #offerBtnRow button{padding:16px 12px; font-size:18px; border-radius:14px}
  #acceptBtn{min-height:60px}
  @media (max-width:760px){
    #offerBackdrop{padding:0; align-items:stretch}
    #offerCard{width:100%; max-height:none; height:100%; border-radius:0; border-left:0; border-right:0; display:flex; flex-direction:column; justify-content:center; animation:slideUp .25s ease}
    #offerPayHero{font-size:54px}
    #offerBtnRow{flex-direction:column}
    #acceptBtn{min-height:68px; font-size:20px}
    #declineBtn{min-height:52px}
  }
  /* toasts */
  #toasts{position:fixed; right:12px; top:64px; z-index:3000; display:flex; flex-direction:column; gap:8px; max-width:min(360px,calc(100vw - 24px))}
  .toast{background:#101725; border:1px solid var(--line); border-left:4px solid var(--acc2); border-radius:10px; padding:10px 12px; font-size:13px; box-shadow:0 8px 30px #0008}
  .toast.good{border-left-color:var(--acc)}
  .toast.warn{border-left-color:var(--warn)}
  .toast.bad{border-left-color:var(--danger)}
  .vehGrid{display:grid; grid-template-columns:1fr 1fr; gap:6px}
  .veh{
    border:1px solid var(--line); border-radius:10px; padding:8px; font-size:12px;
    cursor:pointer; background:#0d1320;
  }
  .veh.sel{border-color:var(--acc); background:#0f1f18}
  .veh .e{font-size:18px}
  #mobileTabs{display:none}
  .foot{max-width:1500px; margin:0 auto; padding:6px 14px 30px; color:var(--mut); font-size:12px}
  .kbd{background:#0006; border:1px solid var(--line); border-radius:6px; padding:1px 6px; font-size:11px}
  .chkRow{display:flex; gap:6px; align-items:center; font-size:12px; color:var(--mut)}
  .chkRow input{width:auto}
  #appView[hidden]{display:none}
  .faq{border:1px solid var(--line); border-radius:10px; padding:10px 12px; margin:8px 0; background:#0d1320}
  .faq summary{cursor:pointer; font-weight:700; font-size:14px}
  .faq summary::marker{color:var(--acc)}
  .faq .mut{margin-top:6px}
  .flink{color:var(--mut); font-size:13px; text-decoration:none; margin:0 8px}
  .flink:hover{color:var(--acc2)}
  /* landing */
  #landingView{max-width:1060px; margin:0 auto; padding:26px 16px 40px}
  .landNav{display:flex; align-items:center; gap:10px; padding:6px 2px 18px}
  .hero{
    border:1px solid var(--line); border-radius:20px; padding:34px 28px;
    background:radial-gradient(600px 200px at 20% 0%, #12332a55, transparent), linear-gradient(180deg,var(--panel),#0d1320);
    text-align:center;
  }
  .hero h1{font-size:clamp(30px,5vw,52px); margin:10px 0 8px; letter-spacing:-.5px}
  .hero h1 span{color:var(--acc)}
  .hero p{color:var(--mut); max-width:640px; margin:0 auto 18px; font-size:15px; line-height:1.6}
  .ctaRow{display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin:16px 0 6px}
  .ctaRow button{font-size:16px; padding:12px 22px}
  .landStats{display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin-top:14px}
  .featGrid{display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px; margin-top:14px}
  .feat{background:linear-gradient(180deg,var(--panel),#101624); border:1px solid var(--line); border-radius:14px; padding:16px}
  .feat .ic{font-size:26px}
  .feat h4{margin:8px 0 6px}
  .vehStrip{display:flex; gap:8px; flex-wrap:wrap; justify-content:center; margin-top:12px}
  .vehStrip .pill{font-size:13px}
  .steps{display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px; margin-top:12px}
  .step{background:#0d1320; border:1px solid var(--line); border-radius:14px; padding:16px}
  .step .n{font-size:22px; font-weight:900; color:var(--acc)}
  .splitBand{
    margin-top:14px; border:1px solid var(--line); border-radius:14px; padding:16px; text-align:center;
    background:linear-gradient(90deg,#0f1f18,#101a2e);
  }
  /* photo layout */
  .heroSplit{display:grid; grid-template-columns:1.05fr .95fr; gap:22px; align-items:center; text-align:left}
  .heroSplit .heroCopy{text-align:left}
  .heroSplit .heroCopy p{margin:0 0 14px}
  .heroSplit .ctaRow{justify-content:flex-start}
  .heroSplit .landStats{justify-content:flex-start}
  .heroPhoto{position:relative; border-radius:16px; overflow:hidden; border:1px solid var(--line); min-height:300px}
  .heroPhoto img{display:block; width:100%; height:100%; object-fit:cover; min-height:300px; max-height:460px}
  .heroPhoto::after{content:""; position:absolute; inset:0; background:linear-gradient(200deg,transparent 55%,rgba(4,8,14,.72));}
  .payFloat{
    position:absolute; left:12px; bottom:12px; z-index:2;
    background:rgba(10,15,25,.92); border:1px solid var(--line); border-radius:12px; padding:10px 12px; font-size:13px;
  }
  .payFloat b{color:var(--acc)}
  .fleetGrid{display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:12px; margin-top:12px}
  .fleetCard{position:relative; border-radius:14px; overflow:hidden; border:1px solid var(--line); min-height:200px; background:#0d1320}
  .fleetCard img{display:block; width:100%; height:210px; object-fit:cover}
  .fleetCard .cap{position:absolute; left:0; right:0; bottom:0; padding:26px 12px 10px; font-size:13px;
    background:linear-gradient(transparent,rgba(4,8,14,.88));}
  .fleetCard .cap b{display:block; font-size:14px}
  .banner{position:relative; margin-top:18px; border-radius:18px; overflow:hidden; border:1px solid var(--line)}
  .banner img{display:block; width:100%; height:260px; object-fit:cover}
  .banner .over{position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px;
    background:rgba(4,8,14,.62); padding:20px; text-align:center}
  .banner .over h2{margin:0; font-size:clamp(22px,4vw,34px)}
  .credit{font-size:11px; color:var(--mut); text-align:center; margin-top:10px}
  @media (max-width:820px){ .heroSplit{grid-template-columns:1fr} }
  /* driver landing */
  #driverLandingView{max-width:1060px; margin:0 auto; padding:26px 16px 40px}
  #driverLandingView[hidden]{display:none}
  .earnCalc{background:#0d1320; border:1px solid var(--line); border-radius:14px; padding:16px; margin-top:12px}
  .earnCalc output{font-weight:800; color:var(--acc)}
  .earnCalc input[type=range]{width:100%; accent-color:var(--acc)}
  .reqGrid{display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px; margin-top:12px}
  .reqCard{background:#0d1320; border:1px solid var(--line); border-radius:14px; padding:16px}
  /* professional footer */
  .siteFooter{margin-top:26px; border:1px solid var(--line); border-radius:18px; background:linear-gradient(180deg,#101725,#0b111d); padding:26px 22px 16px}
  .footGrid{display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr 1fr; gap:18px; text-align:left}
  .siteFooter.client .footGrid{grid-template-columns:1.6fr 1fr 1fr 1fr}
  .footBrand .logo{margin-bottom:8px}
  .footCol h5{margin:0 0 10px; font-size:12px; text-transform:uppercase; letter-spacing:.8px; color:var(--txt)}
  .footCol a{display:block; color:var(--mut); font-size:13px; text-decoration:none; margin:7px 0; line-height:1.4}
  .footCol a:hover{color:var(--acc2)}
  .footSocial{display:flex; gap:8px; margin-top:10px; flex-wrap:wrap}
  .footSocial a{display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; border:1px solid var(--line); border-radius:9px; color:var(--txt); text-decoration:none; font-size:15px; margin:0}
  .footSocial a:hover{border-color:var(--acc)}
  .footBadgeRow{display:flex; gap:8px; flex-wrap:wrap; margin-top:12px}
  .footBottom{margin-top:18px; padding-top:14px; border-top:1px solid var(--line); display:flex; gap:10px; flex-wrap:wrap; align-items:center; font-size:12px; color:var(--mut)}
  .footBottom .spacer{flex:1}
  .footBottom a{color:var(--mut); text-decoration:none; margin:0 2px}
  .footBottom a:hover{color:var(--acc2)}
  .footTrust{display:flex; gap:8px; flex-wrap:wrap; margin-top:10px}
  @media (max-width:860px){ .footGrid{grid-template-columns:1fr 1fr} }
  @media (max-width:520px){ .footGrid{grid-template-columns:1fr} .footBottom{flex-direction:column; align-items:flex-start} }
  /* auth */
  #authView{position:fixed; inset:0; z-index:2500; background:rgba(0,0,0,.65); display:none; align-items:center; justify-content:center; padding:16px}
  #authView.show{display:flex}
  #authCard{width:min(420px,100%); background:#101725; border:1px solid var(--line); border-radius:18px; padding:22px}
  #authCard .tabs{margin-bottom:12px}
  #authErr{color:var(--danger); font-size:13px; min-height:18px; margin-top:8px}
  @media (max-width:1100px){
    #layout{grid-template-columns:340px 1fr}
    #rightCol{display:none}
    #rightCol.open{display:block; position:fixed; right:12px; top:60px; bottom:12px; width:min(360px,calc(100vw - 24px)); z-index:1500; overflow:auto}
  }
  @media (max-width:760px){
    #layout{grid-template-columns:1fr; padding:10px}
    #mapWrap{min-height:0}
    #cityMap{height:440px}
    #topbar{gap:6px; padding:8px 10px}
    .logo{font-size:14px}
    .logoMark{width:32px; height:34px; font-size:17px}
    .logo small{font-size:9px}
    #topbar button.small, #topbar .pill{font-size:12px; padding:6px 8px}
    #userChip{max-width:120px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; display:inline-flex}
    #mobileTabs{
      display:flex; gap:6px; position:sticky; bottom:10px; z-index:1100;
      background:rgba(11,14,19,.95); border:1px solid var(--line); border-radius:14px; padding:8px; margin:0 10px;
    }
    #mobileTabs button{flex:1}
  }
