/* GP's Route Optimizer V9 — extracted from production V8.7.12 */
:root{--p:#123B5D;--o:#0F766E;--bg:#f5f6fa;--card:#fff;--line:#dfe3eb;--ink:#171923;--muted:#687080;--soft:#E8F0F4}
body.dark{--bg:#11131a;--card:#1b1e28;--line:#343846;--ink:#f5f6fb;--muted:#aeb5c4;--soft:#29243a}
body.dark input,body.dark textarea,body.dark select{background:#242733;color:#fff;border-color:#414657}
body.dark th{background:#242733}
body.dark .warn{background:#392b1f;border-color:#76502c}
body.dark .status{background:#2b2437;color:#eadcff}
*{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:var(--bg);color:var(--ink)}
header{padding:17px;background:linear-gradient(135deg,var(--p),#7435aa);color:white}h1{font-size:22px;margin:0}header p{margin:5px 0 0;opacity:.9}
main{max-width:1120px;margin:auto;padding:13px}.card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:14px;margin-bottom:13px;box-shadow:0 3px 12px #0000000a}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:11px}.grid3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:11px}
label{display:block;font-weight:700;font-size:14px;margin-bottom:5px}input,textarea,select{width:100%;font:inherit;padding:10px;border:1px solid #cbd1da;border-radius:10px;background:#fff}
textarea{min-height:190px;resize:vertical}button{border:0;border-radius:10px;padding:11px 14px;font-weight:750;cursor:pointer}.primary{background:var(--p);color:#fff}.orange{background:var(--o);color:#fff}.soft{background:#E8F0F4;color:var(--p)}.danger{background:#ffe9ec;color:#a00020}
.row{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.status{margin-top:10px;padding:10px;border-radius:10px;background:#f1edf7;color:#421171;display:none;white-space:pre-wrap}
.small,.muted{font-size:13px;color:var(--muted)}.warn{background:#EEF6F8;border:1px solid #ffd5a4;padding:10px;border-radius:10px;font-size:13px}
table{width:100%;border-collapse:collapse;font-size:13px}th,td{padding:8px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}th{background:#fafbfe;position:sticky;top:0}.tablewrap{max-height:500px;overflow:auto;border:1px solid var(--line);border-radius:10px}
.ok{color:#087a34;font-weight:700}.review{color:#b45309;font-weight:700}.bad{color:#b00020;font-weight:700}.batch{border:1px solid var(--line);padding:10px;border-radius:10px;margin-top:8px}
#map{height:420px;border-radius:12px;border:1px solid var(--line)}progress{width:100%;height:15px}.pill{display:inline-block;background:var(--soft);padding:4px 8px;border-radius:999px;font-size:12px}
.metric{border:1px solid var(--line);border-radius:13px;padding:12px;background:var(--card)}
.metric strong{font-size:23px;display:block;margin-top:3px}
.sticky-nav{position:sticky;bottom:8px;z-index:500;box-shadow:0 8px 30px #0003}
.compact-input{max-width:130px}
.history-item{border-bottom:1px solid var(--line);padding:10px 0}.ocr-box{border:2px dashed var(--line);border-radius:14px;padding:12px}.confidence-low{color:#b00020;font-weight:700}.confidence-mid{color:#b45309;font-weight:700}.confidence-high{color:#087a34;font-weight:700}
.icon-btn{min-width:44px}
.driver-panel{border:2px solid var(--p);border-radius:15px;padding:14px;background:var(--card)}
.big-distance{font-size:30px;font-weight:850}
.voice-on{background:#087a34!important;color:white!important}
.timer{font-variant-numeric:tabular-nums;font-weight:800}
.analytics-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.undo-btn{background:#E8F3F8;color:#0F4C6E}.reopen-row{background:#f8fbff}.privacy-on{background:#087a34!important;color:#fff!important}.privacy-box{border:2px solid #087a34;border-radius:14px;padding:12px}.sanitised{color:#087a34;font-weight:700}
@media(max-width:760px){.analytics-grid{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.grid,.grid3{grid-template-columns:1fr}#map{height:330px}}

:root{
  --bg:#F4F7FA;
  --card:rgba(255,255,255,.92);
  --text:#102A43;
  --muted:#627D98;
  --line:#D9E2EC;
  --primary:#0B3C5D;
  --primary2:#1B5E7A;
  --accent:#14B8A6;
  --soft:#EAF2F7;
  --danger:#B4233A;
  --warning:#D97706;
  --shadow:0 12px 32px rgba(15,23,42,.10);
}
body{
  background:
    radial-gradient(circle at top right,rgba(20,184,166,.08),transparent 26%),
    linear-gradient(180deg,#EEF4F8 0%,#F7FAFC 42%,#F4F7FA 100%);
  color:var(--text);
}
header{
  background:linear-gradient(135deg,#071E2E 0%,#0B3C5D 55%,#1B5E7A 100%)!important;
  box-shadow:0 10px 28px rgba(7,30,46,.24);
  border-bottom:1px solid rgba(255,255,255,.12);
}
.card{
  background:var(--card)!important;
  border:1px solid rgba(203,213,225,.75)!important;
  box-shadow:var(--shadow)!important;
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}
button{
  border-radius:14px!important;
  font-weight:700!important;
  box-shadow:0 4px 12px rgba(15,23,42,.08);
}
button.primary,.primary{background:linear-gradient(135deg,#0B3C5D,#1B5E7A)!important}
button.orange,.orange{background:linear-gradient(135deg,#0F766E,#14B8A6)!important}
input,select,textarea{
  border-radius:14px!important;
  border:1px solid #CBD5E1!important;
  background:#fff!important;
  box-shadow:inset 0 1px 2px rgba(15,23,42,.04);
}
.metric{
  background:linear-gradient(180deg,#FFFFFF,#F8FBFD)!important;
  border:1px solid #DCE6ED!important;
  border-radius:16px!important;
}
.privacy-box{
  border:1px solid rgba(20,184,166,.35)!important;
  background:linear-gradient(180deg,rgba(240,253,250,.92),rgba(255,255,255,.95))!important;
  box-shadow:0 8px 22px rgba(15,118,110,.08);
}
.pill{
  background:#E7F1F5!important;
  color:#0B3C5D!important;
  border:1px solid #C9DCE6;
}
.tablewrap{
  border-radius:16px;
  overflow:hidden;
  border:1px solid #DCE6ED;
  background:#fff;
}
table thead{background:linear-gradient(180deg,#F1F6F9,#E9F1F5)!important}


:root{
  --bg:#F3F6FA;
  --card:rgba(255,255,255,.88);
  --line:rgba(148,163,184,.28);
  --ink:#0F172A;
  --muted:#64748B;
  --primary:#0F172A;
  --primary2:#1E3A8A;
  --accent:#2563EB;
  --accent2:#38BDF8;
  --success:#059669;
  --danger:#DC2626;
  --warning:#D97706;
  --soft:rgba(226,232,240,.72);
  --shadow:0 18px 45px rgba(15,23,42,.12);
}
@media (prefers-color-scheme: dark){
  body:not(.light){
    --bg:#08111F;
    --card:rgba(15,23,42,.82);
    --line:rgba(148,163,184,.18);
    --ink:#E5EEF8;
    --muted:#94A3B8;
    --soft:rgba(30,41,59,.74);
    --shadow:0 20px 55px rgba(0,0,0,.34);
  }
}
body.dark{
  --bg:#08111F;
  --card:rgba(15,23,42,.82);
  --line:rgba(148,163,184,.18);
  --ink:#E5EEF8;
  --muted:#94A3B8;
  --soft:rgba(30,41,59,.74);
  --shadow:0 20px 55px rgba(0,0,0,.34);
}
body{
  background:
    radial-gradient(circle at 88% 6%,rgba(37,99,235,.16),transparent 26%),
    radial-gradient(circle at 8% 18%,rgba(56,189,248,.10),transparent 20%),
    var(--bg)!important;
  color:var(--ink)!important;
}
header{
  background:
    linear-gradient(135deg,rgba(15,23,42,.98),rgba(30,58,138,.96) 65%,rgba(37,99,235,.92))!important;
  border-bottom:1px solid rgba(255,255,255,.10);
  box-shadow:0 18px 38px rgba(15,23,42,.28);
}
.card{
  background:var(--card)!important;
  border:1px solid var(--line)!important;
  box-shadow:var(--shadow)!important;
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  border-radius:22px!important;
}
button{
  border-radius:14px!important;
  font-weight:750!important;
  transition:transform .16s ease,box-shadow .16s ease,opacity .16s ease;
}
button:active{transform:scale(.97)}
button.primary,.primary{
  background:linear-gradient(135deg,#1D4ED8,#2563EB)!important;
  box-shadow:0 10px 22px rgba(37,99,235,.28)!important;
}
button.orange,.orange{
  background:linear-gradient(135deg,#0891B2,#2563EB)!important;
}
input,textarea,select{
  border-radius:14px!important;
  background:rgba(255,255,255,.92)!important;
  border:1px solid rgba(148,163,184,.35)!important;
}
body.dark input,body.dark textarea,body.dark select,
@media (prefers-color-scheme: dark){
  body:not(.light) input,
  body:not(.light) textarea,
  body:not(.light) select{
    background:rgba(15,23,42,.90)!important;
    color:var(--ink)!important;
  }
}
.metric{
  border-radius:18px!important;
  background:linear-gradient(180deg,rgba(255,255,255,.96),rgba(241,245,249,.86))!important;
}
body.dark .metric{
  background:linear-gradient(180deg,rgba(30,41,59,.90),rgba(15,23,42,.84))!important;
}
.pill{
  background:rgba(37,99,235,.10)!important;
  color:#1D4ED8!important;
  border:1px solid rgba(37,99,235,.18);
}
#splashScreen{
  position:fixed;
  inset:0;
  z-index:99999;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  background:
    radial-gradient(circle at 50% 30%,rgba(56,189,248,.18),transparent 28%),
    linear-gradient(160deg,#020617,#0F172A 52%,#1E3A8A);
  color:#fff;
  transition:opacity .45s ease,visibility .45s ease;
}
#splashScreen.hidden{opacity:0;visibility:hidden;pointer-events:none}
.splash-logo{
  width:104px;height:104px;border-radius:28px;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(145deg,#1D4ED8,#38BDF8);
  box-shadow:0 28px 60px rgba(37,99,235,.35);
  font-size:44px;font-weight:900;
}
.splash-title{font-size:28px;font-weight:850;margin-top:18px}
.splash-subtitle{opacity:.76;margin-top:6px}
.splash-loader{
  width:150px;height:4px;border-radius:999px;
  background:rgba(255,255,255,.15);overflow:hidden;margin-top:26px
}
.splash-loader::after{
  content:"";display:block;width:45%;height:100%;
  background:linear-gradient(90deg,#38BDF8,#fff);
  animation:splashmove 1.1s ease-in-out infinite;
}
@keyframes splashmove{0%{transform:translateX(-120%)}100%{transform:translateX(330%)}}
.update-banner{
  display:none;
  margin-top:10px;
  padding:12px;
  border-radius:14px;
  background:linear-gradient(135deg,rgba(37,99,235,.12),rgba(56,189,248,.12));
  border:1px solid rgba(37,99,235,.22);
}
.update-banner.show{display:block}
.loading-shimmer{
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.35),transparent);
  background-size:220% 100%;
  animation:shimmer 1.3s linear infinite;
}
@keyframes shimmer{to{background-position:-220% 0}}


#updateSuccessToast{
  position:fixed;
  left:50%;
  bottom:28px;
  transform:translateX(-50%) translateY(20px);
  z-index:999999;
  max-width:calc(100% - 32px);
  background:#067647;
  color:#fff;
  padding:12px 18px;
  border-radius:14px;
  font-weight:750;
  box-shadow:0 18px 40px rgba(6,118,71,.28);
  opacity:0;
  visibility:hidden;
  transition:opacity .25s ease,transform .25s ease,visibility .25s ease;
}
#updateSuccessToast.show{
  opacity:1;
  visibility:visible;
  transform:translateX(-50%) translateY(0);
}


/* ===== GP’s Route Optimizer V6.0 Premium UI ===== */
:root{
  --v6-bg:#07111f;
  --v6-bg-2:#0b1c31;
  --v6-panel:rgba(255,255,255,.86);
  --v6-panel-dark:rgba(12,27,47,.86);
  --v6-border:rgba(148,163,184,.22);
  --v6-text:#0f172a;
  --v6-muted:#64748b;
  --v6-blue:#2f6df6;
  --v6-cyan:#22d3ee;
  --v6-green:#10b981;
  --v6-shadow:0 20px 55px rgba(15,23,42,.15);
}
html{scroll-behavior:smooth}
body{
  background:
    radial-gradient(circle at 85% 5%,rgba(47,109,246,.22),transparent 28%),
    radial-gradient(circle at 10% 20%,rgba(34,211,238,.12),transparent 22%),
    #edf3fb !important;
  padding-bottom:104px!important;
}
header{
  min-height:310px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  padding:42px 28px 32px!important;
  background:
    radial-gradient(circle at 84% 16%,rgba(56,189,248,.28),transparent 26%),
    linear-gradient(145deg,#06101e 0%,#10264a 55%,#245ee8 100%)!important;
  border-bottom-left-radius:34px;
  border-bottom-right-radius:34px;
  box-shadow:0 24px 60px rgba(15,23,42,.28);
}
header h1{
  font-size:clamp(34px,8vw,54px)!important;
  line-height:1.03!important;
  letter-spacing:-1.6px;
  max-width:720px;
}
header p{
  max-width:680px;
  font-size:clamp(17px,4.5vw,24px)!important;
  opacity:.82;
}
header #darkMode{
  align-self:flex-start;
  margin-top:16px;
  background:rgba(255,255,255,.92)!important;
  box-shadow:0 12px 30px rgba(2,8,23,.22);
}
main{
  max-width:1060px!important;
  margin:-28px auto 0!important;
  position:relative;
  z-index:5;
}
.card{
  border-radius:28px!important;
  border:1px solid rgba(255,255,255,.75)!important;
  background:rgba(255,255,255,.88)!important;
  box-shadow:var(--v6-shadow)!important;
  backdrop-filter:blur(22px);
  -webkit-backdrop-filter:blur(22px);
  overflow:hidden;
}
body.dark .card{
  background:rgba(10,24,43,.88)!important;
  border-color:rgba(148,163,184,.16)!important;
}
.card > h2,.card > h3,.card b:first-child{
  letter-spacing:-.35px;
}
button{
  min-height:50px;
  border-radius:16px!important;
  font-weight:800!important;
  letter-spacing:-.1px;
  box-shadow:none;
}
button.primary,.primary{
  background:linear-gradient(135deg,#1d4ed8,#3b82f6 60%,#22d3ee)!important;
  color:white!important;
  box-shadow:0 12px 28px rgba(37,99,235,.28)!important;
}
button.soft,.soft{
  background:linear-gradient(180deg,rgba(241,245,249,.98),rgba(226,232,240,.88))!important;
}
button.danger,.danger{
  background:linear-gradient(135deg,#ef4444,#be123c)!important;
  color:#fff!important;
}
input,textarea,select{
  min-height:56px;
  border-radius:17px!important;
  border:1px solid rgba(148,163,184,.3)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7);
}
textarea{min-height:170px}
.metric{
  border-radius:20px!important;
  border:1px solid rgba(148,163,184,.2)!important;
}
.privacy-box{
  border-radius:24px!important;
  background:
    linear-gradient(135deg,rgba(236,253,245,.94),rgba(239,246,255,.92))!important;
  border:1px solid rgba(16,185,129,.3)!important;
}
#apiKeyVaultCard{
  background:
    radial-gradient(circle at 100% 0%,rgba(34,211,238,.12),transparent 30%),
    rgba(255,255,255,.9)!important;
}
#map{
  border-radius:24px!important;
  overflow:hidden;
  box-shadow:inset 0 0 0 1px rgba(148,163,184,.2);
}
table{
  border-collapse:separate!important;
  border-spacing:0!important;
  overflow:hidden;
  border-radius:20px!important;
}
thead th{
  background:rgba(241,245,249,.95)!important;
  position:sticky;
  top:0;
  z-index:3;
}
.v6-command-center{
  margin:0 0 18px;
  padding:22px;
  color:white;
  background:
    radial-gradient(circle at 85% 0%,rgba(34,211,238,.25),transparent 31%),
    linear-gradient(145deg,#07111f,#13315d 64%,#1e5ce8);
  border:1px solid rgba(255,255,255,.1);
  border-radius:28px;
  box-shadow:0 24px 55px rgba(15,23,42,.28);
}
.v6-command-top{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
}
.v6-eyebrow{
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:1.7px;
  opacity:.68;
  font-weight:800;
}
.v6-command-title{
  font-size:26px;
  font-weight:900;
  letter-spacing:-.8px;
  margin-top:5px;
}
.v6-live-pill{
  padding:8px 12px;
  border-radius:999px;
  background:rgba(16,185,129,.16);
  border:1px solid rgba(52,211,153,.38);
  color:#a7f3d0;
  font-weight:800;
  white-space:nowrap;
}
.v6-kpis{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin-top:18px;
}
.v6-kpi{
  padding:14px;
  border-radius:18px;
  background:rgba(255,255,255,.09);
  border:1px solid rgba(255,255,255,.11);
}
.v6-kpi span{
  display:block;
  font-size:12px;
  opacity:.66;
}
.v6-kpi strong{
  display:block;
  margin-top:5px;
  font-size:23px;
}
.v6-quick-actions{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-top:16px;
}
.v6-action{
  display:flex;
  min-height:72px;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:10px;
  color:white;
  text-decoration:none;
  border-radius:18px;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.12);
  font-weight:800;
}
.v6-action .icon{font-size:24px}
.v6-section-label{
  display:flex;
  align-items:center;
  gap:10px;
  margin:26px 4px 12px;
  font-weight:900;
  font-size:19px;
  letter-spacing:-.35px;
}
.v6-section-label::after{
  content:"";
  height:1px;
  flex:1;
  background:linear-gradient(90deg,rgba(148,163,184,.35),transparent);
}
.v6-bottom-nav{
  position:fixed;
  z-index:99990;
  left:50%;
  bottom:max(12px,env(safe-area-inset-bottom));
  transform:translateX(-50%);
  width:min(720px,calc(100% - 24px));
  padding:9px;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  border-radius:24px;
  background:rgba(7,17,31,.92);
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 22px 55px rgba(2,8,23,.34);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
}
.v6-bottom-nav button{
  min-height:58px;
  color:rgba(255,255,255,.7)!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  font-size:11px;
}
.v6-bottom-nav button span:first-child{font-size:22px}
.v6-bottom-nav button.active{
  color:white!important;
  background:linear-gradient(135deg,rgba(47,109,246,.55),rgba(34,211,238,.18))!important;
}
.v6-settings-sheet{
  position:fixed;
  z-index:99995;
  inset:0;
  display:none;
  align-items:flex-end;
  justify-content:center;
  padding:16px;
  background:rgba(2,8,23,.52);
  backdrop-filter:blur(8px);
}
.v6-settings-sheet.show{display:flex}
.v6-settings-panel{
  width:min(720px,100%);
  max-height:84vh;
  overflow:auto;
  padding:22px;
  border-radius:28px;
  background:#f8fafc;
  box-shadow:0 25px 70px rgba(2,8,23,.4);
}
.v6-settings-panel h2{margin:0}
.v6-settings-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:16px;
}
.v6-settings-item{
  padding:16px;
  border-radius:18px;
  background:#fff;
  border:1px solid rgba(148,163,184,.22);
}
@media(max-width:620px){
  header{min-height:285px;padding:36px 24px 30px!important}
  main{margin-top:-20px!important}
  .v6-kpis{grid-template-columns:repeat(3,1fr)}
  .v6-kpi{padding:11px}
  .v6-kpi strong{font-size:19px}
  .v6-quick-actions{grid-template-columns:repeat(2,1fr)}
  .v6-settings-grid{grid-template-columns:1fr}
}


/* ===== V6.1 Ultra Premium ===== */
header{
  min-height:330px!important;
  background:
    radial-gradient(circle at 78% 10%,rgba(98,166,255,.33),transparent 24%),
    radial-gradient(circle at 12% 16%,rgba(34,211,238,.12),transparent 20%),
    linear-gradient(150deg,#030712 0%,#081b36 52%,#1d4ed8 100%)!important;
}
header::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(120deg,rgba(255,255,255,.06),transparent 35%,rgba(255,255,255,.03));
}
.card{
  background:linear-gradient(180deg,rgba(255,255,255,.94),rgba(247,250,255,.88))!important;
  border:1px solid rgba(255,255,255,.9)!important;
  box-shadow:
    0 28px 70px rgba(15,23,42,.16),
    inset 0 1px 0 rgba(255,255,255,.95)!important;
}
.v6-command-center{
  background:
    radial-gradient(circle at 88% 0%,rgba(56,189,248,.34),transparent 30%),
    linear-gradient(150deg,#030712,#0b2141 58%,#1d4ed8)!important;
  box-shadow:
    0 30px 70px rgba(15,23,42,.34),
    inset 0 1px 0 rgba(255,255,255,.10)!important;
}
.v6-action{
  background:linear-gradient(180deg,rgba(255,255,255,.14),rgba(255,255,255,.07))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18);
}
.v6-action:hover{transform:translateY(-1px)}
.v6-bottom-nav{
  background:linear-gradient(180deg,rgba(8,17,31,.96),rgba(3,7,18,.96))!important;
  box-shadow:0 28px 70px rgba(2,8,23,.48),inset 0 1px 0 rgba(255,255,255,.08)!important;
}
.v61-settings-section{
  margin-top:18px;
  padding:18px;
  border-radius:22px;
  background:linear-gradient(180deg,#ffffff,#f4f7fb);
  border:1px solid rgba(148,163,184,.20);
  box-shadow:0 14px 32px rgba(15,23,42,.08);
}
.v61-settings-section h3{
  margin:0 0 10px;
  font-size:18px;
}
.v61-settings-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding:12px 0;
  border-bottom:1px solid rgba(148,163,184,.16);
}
.v61-settings-row:last-child{border-bottom:0}
.v61-settings-copy{flex:1}
.v61-settings-copy b{display:block}
.v61-settings-copy .small{margin-top:3px}
.v61-settings-actions{display:flex;gap:8px;flex-wrap:wrap}
.v61-badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:7px 10px;
  border-radius:999px;
  background:rgba(16,185,129,.10);
  color:#047857;
  font-size:12px;
  font-weight:800;
  border:1px solid rgba(16,185,129,.18);
}
.v61-hidden-main{display:none!important}


/* ===== V6.2 Ultra Premium Settings Architecture ===== */
.v62-home-hidden{display:none!important}
.v62-settings-hero{
  padding:20px;
  border-radius:24px;
  color:white;
  background:
    radial-gradient(circle at 88% 0%,rgba(56,189,248,.28),transparent 28%),
    linear-gradient(145deg,#030712,#10264a 64%,#1d4ed8);
  box-shadow:0 18px 46px rgba(15,23,42,.26);
}
.v62-settings-hero .small{color:rgba(255,255,255,.72)}
.v62-settings-list{
  display:grid;
  gap:12px;
  margin-top:16px;
}
.v62-settings-card{
  padding:16px;
  border-radius:20px;
  background:linear-gradient(180deg,#fff,#f6f9fd);
  border:1px solid rgba(148,163,184,.18);
  box-shadow:0 12px 28px rgba(15,23,42,.07);
}
.v62-settings-card .row{align-items:center}
.v62-settings-icon{
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  border-radius:15px;
  font-size:23px;
  background:linear-gradient(145deg,#dbeafe,#eff6ff);
  border:1px solid rgba(59,130,246,.18);
}
.v62-settings-title{font-weight:900}
.v62-settings-sub{font-size:13px;color:#64748b;margin-top:3px;line-height:1.45}
.v62-settings-action{
  margin-left:auto;
  white-space:nowrap;
}
.v62-detail-sheet .v6-settings-panel{
  background:linear-gradient(180deg,#f8fbff,#eef4fb);
}
.v62-status-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:14px;
}
.v62-status-item{
  padding:15px;
  border-radius:18px;
  background:#fff;
  border:1px solid rgba(148,163,184,.18);
}
.v62-status-item span{display:block;font-size:12px;color:#64748b}
.v62-status-item strong{display:block;font-size:22px;margin-top:5px}
.v62-update-panel{
  padding:18px;
  border-radius:22px;
  background:linear-gradient(145deg,#e8f1ff,#f8fbff);
  border:1px solid rgba(59,130,246,.18);
}
@media(max-width:620px){
  .v62-status-grid{grid-template-columns:1fr 1fr}
}


/* ===== V6.3 Signature Premium ===== */
:root{
  --sig-ink:#08111f;
  --sig-navy:#0c1c33;
  --sig-blue:#2f6df6;
  --sig-cyan:#5bd6ff;
  --sig-silver:#dbe7f5;
  --sig-border:rgba(148,163,184,.18);
}
body{
  background:
    radial-gradient(circle at 15% 8%,rgba(76,130,255,.11),transparent 28%),
    radial-gradient(circle at 92% 0%,rgba(91,214,255,.12),transparent 24%),
    linear-gradient(180deg,#eef4fb 0%,#e7f0fa 100%)!important;
}
header{
  min-height:350px!important;
  border-bottom-left-radius:40px!important;
  border-bottom-right-radius:40px!important;
  background:
    linear-gradient(120deg,rgba(255,255,255,.05),transparent 32%),
    radial-gradient(circle at 82% 15%,rgba(73,137,255,.34),transparent 24%),
    linear-gradient(145deg,#020617 0%,#0a1d38 54%,#2454ce 100%)!important;
  box-shadow:0 34px 85px rgba(15,23,42,.34)!important;
}
header h1{
  font-weight:900!important;
  letter-spacing:-1.8px!important;
}
header p{
  color:rgba(255,255,255,.74)!important;
  max-width:620px;
}
.card{
  border-radius:32px!important;
  background:
    linear-gradient(180deg,rgba(255,255,255,.97),rgba(247,250,255,.90))!important;
  border:1px solid rgba(255,255,255,.92)!important;
  box-shadow:
    0 30px 75px rgba(15,23,42,.13),
    inset 0 1px 0 rgba(255,255,255,1)!important;
}
.v6-command-center{
  padding:26px!important;
  border-radius:34px!important;
  background:
    linear-gradient(120deg,rgba(255,255,255,.06),transparent 35%),
    radial-gradient(circle at 88% 0%,rgba(91,214,255,.26),transparent 30%),
    linear-gradient(145deg,#020617,#0a2143 64%,#2859df)!important;
  box-shadow:
    0 36px 82px rgba(15,23,42,.36),
    inset 0 1px 0 rgba(255,255,255,.10)!important;
}
.v6-eyebrow{
  letter-spacing:2.2px!important;
  font-size:11px!important;
}
.v6-command-title{
  font-size:30px!important;
  letter-spacing:-1.1px!important;
}
.v6-live-pill{
  background:rgba(255,255,255,.08)!important;
  color:#d8fff3!important;
  border-color:rgba(116,255,203,.26)!important;
}
.v6-kpi{
  border-radius:22px!important;
  background:linear-gradient(180deg,rgba(255,255,255,.10),rgba(255,255,255,.055))!important;
  border-color:rgba(255,255,255,.12)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.09);
}
.v6-kpi strong{font-size:25px!important}
.v6-action{
  min-height:86px!important;
  border-radius:22px!important;
  background:linear-gradient(180deg,rgba(255,255,255,.13),rgba(255,255,255,.06))!important;
  transition:transform .2s ease,background .2s ease;
}
.v6-action:active{
  transform:scale(.98);
  background:rgba(255,255,255,.16)!important;
}
.v6-action .icon{
  font-size:0!important;
  width:34px;
  height:34px;
  display:block;
  border-radius:12px;
  background:
    radial-gradient(circle at 35% 30%,#fff 0 8%,transparent 9%),
    linear-gradient(145deg,#dcecff,#62c5ff 55%,#2f6df6);
  box-shadow:
    0 8px 18px rgba(47,109,246,.28),
    inset 0 1px 0 rgba(255,255,255,.85);
  position:relative;
}
.v6-action .icon::after{
  content:"";
  position:absolute;
  inset:9px;
  border:2px solid rgba(7,17,31,.7);
  border-radius:7px;
}
.v6-bottom-nav{
  padding:8px!important;
  border-radius:26px!important;
  background:
    linear-gradient(180deg,rgba(7,17,31,.97),rgba(2,7,18,.97))!important;
  border:1px solid rgba(255,255,255,.08)!important;
  box-shadow:
    0 30px 78px rgba(2,8,23,.50),
    inset 0 1px 0 rgba(255,255,255,.06)!important;
}
.v6-bottom-nav button{
  min-height:62px!important;
  border-radius:19px!important;
  color:rgba(255,255,255,.58)!important;
}
.v6-bottom-nav button.active{
  color:white!important;
  background:
    linear-gradient(145deg,rgba(47,109,246,.82),rgba(34,211,238,.26))!important;
  box-shadow:0 10px 24px rgba(47,109,246,.24)!important;
}
.v6-bottom-nav button span:first-child{
  font-size:20px!important;
  font-family:Arial,sans-serif;
}
.v62-settings-hero{
  border-radius:28px!important;
  padding:24px!important;
  background:
    radial-gradient(circle at 90% 0%,rgba(91,214,255,.28),transparent 28%),
    linear-gradient(145deg,#020617,#0a2143 62%,#2859df)!important;
}
.v62-settings-card{
  border-radius:24px!important;
  background:
    linear-gradient(180deg,#ffffff,#f5f8fc)!important;
  box-shadow:
    0 16px 36px rgba(15,23,42,.08),
    inset 0 1px 0 #fff!important;
}
.v62-settings-icon{
  width:50px!important;
  height:50px!important;
  border-radius:17px!important;
  background:
    linear-gradient(145deg,#edf5ff,#cfe6ff)!important;
  color:#17325d;
  box-shadow:inset 0 1px 0 #fff;
}
button{
  border-radius:18px!important;
  min-height:52px!important;
  transition:transform .16s ease,box-shadow .16s ease,opacity .16s ease;
}
button:active{transform:scale(.985)}
button.primary{
  background:
    linear-gradient(145deg,#1f56d8,#2f6df6 58%,#5bd6ff)!important;
  box-shadow:
    0 14px 30px rgba(47,109,246,.28),
    inset 0 1px 0 rgba(255,255,255,.35)!important;
}
input,textarea,select{
  background:rgba(255,255,255,.92)!important;
  border:1px solid rgba(148,163,184,.22)!important;
  box-shadow:
    inset 0 1px 0 #fff,
    0 8px 22px rgba(15,23,42,.04)!important;
}
.v62-detail-sheet{
  background:rgba(3,7,18,.60)!important;
  backdrop-filter:blur(16px)!important;
  -webkit-backdrop-filter:blur(16px)!important;
}
.v62-detail-sheet .v6-settings-panel,
.v6-settings-sheet .v6-settings-panel{
  border-radius:32px!important;
  background:
    linear-gradient(180deg,#f9fbff,#edf3fa)!important;
  box-shadow:0 38px 90px rgba(2,8,23,.46)!important;
}
@media(max-width:620px){
  header{min-height:320px!important}
  .v6-command-center{padding:22px!important}
  .v6-command-title{font-size:27px!important}
}


/* ===== V6.4 Dashboard Navigation ===== */
.v64-dashboard-placeholder{display:none!important}
.v64-dashboard-sheet{
  position:fixed;
  inset:0;
  z-index:100000;
  display:none;
  flex-direction:column;
  background:
    radial-gradient(circle at 90% 0%,rgba(91,214,255,.18),transparent 27%),
    linear-gradient(180deg,#06101e,#0b1f3c 62%,#143f9c);
  color:white;
  overflow:auto;
  overscroll-behavior:contain;
  padding:
    max(24px,env(safe-area-inset-top))
    18px
    calc(112px + env(safe-area-inset-bottom));
}
.v64-dashboard-sheet.show{display:flex}
.v64-dashboard-shell{
  width:min(760px,100%);
  margin:0 auto;
}
.v64-dashboard-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}
.v64-dashboard-header h2{
  margin:4px 0 0;
  color:white;
  font-size:29px;
  letter-spacing:-1px;
}
.v64-dashboard-close{
  color:white!important;
  background:rgba(255,255,255,.10)!important;
  border:1px solid rgba(255,255,255,.12)!important;
}
.v64-dashboard-mount .v6-command-center{
  margin:0!important;
  box-shadow:
    0 36px 84px rgba(0,0,0,.36),
    inset 0 1px 0 rgba(255,255,255,.10)!important;
}
.v64-dashboard-note{
  margin-top:16px;
  padding:15px;
  border-radius:20px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.10);
  color:rgba(255,255,255,.76);
  font-size:13px;
  line-height:1.55;
}
.v6-bottom-nav{
  grid-template-columns:repeat(5,1fr)!important;
}
.v6-bottom-nav button{
  padding-left:4px!important;
  padding-right:4px!important;
}
@media(max-width:440px){
  .v6-bottom-nav button span:last-child{font-size:10px}
  .v6-bottom-nav button span:first-child{font-size:18px!important}
}


/* V6.5 Dark Premium */
body{background:radial-gradient(circle at 90% 0%,rgba(37,99,235,.16),transparent 28%),linear-gradient(180deg,#020617,#06101e)!important;color:#f8fafc!important;padding-bottom:112px!important}
header{min-height:230px!important;padding:calc(34px + env(safe-area-inset-top)) 28px 26px!important;background:radial-gradient(circle at 18% 35%,rgba(91,214,255,.12),transparent 24%),linear-gradient(145deg,#020617,#08162a 62%,#123785)!important;border-radius:0 0 34px 34px!important}
header h1{color:#fff!important} header p{color:rgba(255,255,255,.68)!important} header #darkMode{display:none!important}
main{max-width:820px!important;margin:-18px auto 0!important}
.card{background:linear-gradient(180deg,rgba(15,29,49,.97),rgba(7,17,31,.97))!important;border:1px solid rgba(148,163,184,.18)!important;border-radius:28px!important;color:#f8fafc!important}
.card h2,.card h3,.card label,.card b,.card strong{color:#f8fafc!important}.small,.muted,p{color:#94a3b8!important}
input,textarea,select{color:#fff!important;background:rgba(2,8,23,.72)!important;border:1px solid rgba(148,163,184,.25)!important}input::placeholder,textarea::placeholder{color:#64748b!important}
button{border-radius:18px!important;min-height:54px!important;font-weight:850!important}.primary,button.primary{background:linear-gradient(135deg,#4f46e5,#2563eb 58%,#0ea5e9)!important;color:#fff!important}.soft,button.soft{background:rgba(30,41,59,.86)!important;color:#dbeafe!important;border:1px solid rgba(148,163,184,.15)!important}
.v65-home{display:grid;gap:18px}.v65-builder,.v65-summary{padding:22px}.v65-title{font-size:24px;font-weight:900;letter-spacing:-.7px}.v65-sub{margin-top:5px;font-size:14px;color:#94a3b8}.v65-upload{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}.v65-upload button{min-height:104px}.v65-field{margin-top:14px;padding:14px;border-radius:20px;background:rgba(15,23,42,.72);border:1px solid rgba(148,163,184,.16)}.v65-field label{display:block;font-size:13px;margin-bottom:7px}.v65-create{width:100%;margin-top:16px;min-height:62px!important;font-size:18px}.v65-summary-head{display:flex;justify-content:space-between;align-items:center}.v65-pill{padding:7px 10px;border-radius:999px;background:rgba(148,163,184,.1);font-size:12px}.v65-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:14px}.v65-metric{padding:16px 10px;text-align:center;border-radius:20px;background:rgba(30,41,59,.82);border:1px solid rgba(148,163,184,.16)}.v65-metric strong{display:block;font-size:28px;margin-top:6px}.v65-metric span{font-size:12px;color:#94a3b8}.v65-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:14px}.v65-actions button{min-height:82px}.v65-hide{display:none!important}
.v6-bottom-nav{grid-template-columns:repeat(5,1fr)!important;background:rgba(3,7,18,.96)!important}.v6-bottom-nav button{color:#94a3b8!important}.v6-bottom-nav button.active{color:#fff!important;background:linear-gradient(145deg,rgba(37,99,235,.62),rgba(14,165,233,.18))!important}
@media(max-width:620px){.v65-metrics{grid-template-columns:repeat(2,1fr)}.v65-actions{grid-template-columns:1fr}}


/* ===== V6.5.1 Theme & Readability Fix ===== */
:root{
  --r-bg:#030712;
  --r-panel:#0a1526;
  --r-panel-2:#101d31;
  --r-panel-3:#15243a;
  --r-line:rgba(148,163,184,.22);
  --r-text:#f8fafc;
  --r-text-2:#dbeafe;
  --r-muted:#9fb0c8;
  --r-blue:#3b82f6;
  --r-green:#22c55e;
  --r-amber:#f59e0b;
  --r-red:#ef4444;
}

/* Force one consistent premium dark theme */
html,body{
  background:#030712!important;
  color:var(--r-text)!important;
}
body,
body.dark{
  background:
    radial-gradient(circle at 90% 0%,rgba(37,99,235,.17),transparent 27%),
    radial-gradient(circle at 12% 18%,rgba(14,165,233,.08),transparent 24%),
    linear-gradient(180deg,#020617 0%,#06101e 100%)!important;
}

/* All legacy and modern cards */
.card,
.metric,
.privacy-box,
.v62-settings-card,
.v61-settings-section,
.v62-update-panel,
.v62-status-item,
.v64-dashboard-note,
.v65-field,
.v65-metric,
.v65-action,
.v65-upload-card{
  color:var(--r-text)!important;
}
.card,
section.card,
.v62-settings-card,
.v61-settings-section,
.v62-update-panel,
.v62-status-item{
  background:
    linear-gradient(180deg,rgba(15,29,49,.98),rgba(7,17,31,.98))!important;
  border-color:var(--r-line)!important;
}

/* Typography contrast */
h1,h2,h3,h4,h5,h6,
.card h1,.card h2,.card h3,
.card strong,.card b,
label,legend,summary,
thead th{
  color:var(--r-text)!important;
}
p,.small,.muted,
.card p,.card .small,.card .muted,
.v62-settings-sub,
.v65-sub,
.v65-action span,
.v65-metric span{
  color:var(--r-muted)!important;
}
a{color:#7dd3fc!important}

/* Forms */
input,textarea,select{
  color:var(--r-text)!important;
  background:#081321!important;
  border-color:rgba(148,163,184,.28)!important;
  caret-color:#60a5fa!important;
}
input::placeholder,
textarea::placeholder{
  color:#71829a!important;
  opacity:1!important;
}
select option{
  color:#0f172a!important;
  background:#fff!important;
}

/* Tables: remove white-on-white issue */
table{
  background:#081321!important;
  color:var(--r-text)!important;
  border-color:var(--r-line)!important;
}
thead,
thead tr,
thead th{
  background:#122139!important;
  color:#f8fafc!important;
  border-color:var(--r-line)!important;
}
tbody,
tbody tr,
tbody td{
  background:#0a1728!important;
  color:#dbeafe!important;
  border-color:rgba(148,163,184,.15)!important;
}
tbody tr:nth-child(even) td{
  background:#0d1c30!important;
}
tbody tr.current td,
tbody tr[style*="background"] td{
  background:#102b48!important;
}
td strong,
td b{
  color:#f8fafc!important;
}
td .safe,
.safe-address,
.safe-address-text{
  color:#4ade80!important;
}
td .warning,
.review,
.status-review{
  color:#fbbf24!important;
}

/* Route / address review table */
#reviewTable,
#matchedTable,
#routeTable,
#stopsTable,
.table-wrap,
.table-container{
  background:#081321!important;
  color:var(--r-text)!important;
}
.table-wrap,
.table-container{
  border:1px solid var(--r-line)!important;
  border-radius:20px!important;
  overflow:auto!important;
}

/* Delivery dashboard values */
#deliveryDashboard .metric,
#deliveryDashboard .stat,
.metric-card,
.dashboard-card{
  background:#101d31!important;
  color:var(--r-text)!important;
  border:1px solid var(--r-line)!important;
}
#statCompleted,#statPending,#statFailed,#statParcels,
#estimatedFinish,#estimatedFuel,
.metric strong,.metric-value{
  color:#ffffff!important;
}
.metric .small,
.metric-label{
  color:#9fb0c8!important;
}

/* Privacy cards now readable */
.privacy-box{
  background:
    linear-gradient(180deg,rgba(8,44,47,.96),rgba(5,30,38,.96))!important;
  border-color:rgba(45,212,191,.34)!important;
}
.privacy-box h2,
.privacy-box h3,
.privacy-box b,
.privacy-box strong{
  color:#ecfeff!important;
}
.privacy-box p,
.privacy-box .small{
  color:#b6e8e7!important;
}

/* Buttons */
button,
.btn{
  color:#f8fafc!important;
}
button.soft,.soft{
  color:#dbeafe!important;
  background:#1e293b!important;
  border-color:rgba(148,163,184,.20)!important;
}
button.primary,.primary{
  color:#fff!important;
}
button.danger,.danger{
  color:#fff!important;
}
button:disabled{
  color:#64748b!important;
  background:#111827!important;
  opacity:.72!important;
}

/* Route status colours */
.current,
.status-current{
  color:#fbbf24!important;
}
.pending,
.status-pending{
  color:#bfdbfe!important;
}
.delivered,
.completed,
.status-delivered{
  color:#4ade80!important;
}
.failed,
.unsuccessful,
.status-failed{
  color:#f87171!important;
}

/* Map and map copy */
#map,
.leaflet-container{
  background:#dbeafe!important;
}
.leaflet-popup-content,
.leaflet-popup-content-wrapper{
  color:#0f172a!important;
  background:#fff!important;
}

/* History / summary / notices */
#historyList,
#recentHistory,
#summary,
#routeSummary{
  color:var(--r-text)!important;
}
.notice,
.info-box{
  background:#0f2037!important;
  color:#dbeafe!important;
  border-color:rgba(96,165,250,.24)!important;
}

/* Bottom navigation */
.v6-bottom-nav{
  background:rgba(2,7,18,.98)!important;
  border-color:rgba(148,163,184,.16)!important;
}
.v6-bottom-nav button{
  color:#9fb0c8!important;
}
.v6-bottom-nav button.active{
  color:#fff!important;
}

/* Settings and full-screen sheets */
.v6-settings-panel,
.v62-detail-sheet .v6-settings-panel{
  background:
    linear-gradient(180deg,#0b1526,#07111f)!important;
  color:var(--r-text)!important;
}
.v6-settings-sheet,
.v62-detail-sheet,
.v64-dashboard-sheet{
  color:var(--r-text)!important;
}

/* Drag rows and action buttons */
.drag-handle,
.grip{
  color:#38bdf8!important;
  background:#172033!important;
}
.route-row,
.stop-row{
  background:#0a1728!important;
  color:#dbeafe!important;
  border-color:rgba(148,163,184,.16)!important;
}
.route-row.current,
.stop-row.current{
  background:#102b48!important;
}

/* Make the new V6.5 home especially crisp */
.v65-title,
.v65-builder label,
.v65-summary-head{
  color:#fff!important;
}
.v65-status-pill{
  color:#bfdbfe!important;
  background:rgba(37,99,235,.14)!important;
  border-color:rgba(59,130,246,.30)!important;
}
.v65-upload-card span{
  color:#cbd5e1!important;
}
.v65-metric{
  background:linear-gradient(180deg,#101d31,#0b1728)!important;
}
.v65-action{
  background:linear-gradient(180deg,#101d31,#0b1728)!important;
}

/* iPhone readability: avoid pale inherited opacity */
.card *,
section.card *,
.v6-settings-panel *,
.v64-dashboard-sheet *{
  text-shadow:none;
}
.card [style*="color: white"],
.card [style*="color:#fff"],
.card [style*="color: #fff"]{
  color:#fff!important;
}

/* Prevent status-bar screenshots from visually blending into content */
@supports(padding:max(0px)){
  header{
    padding-top:max(34px,env(safe-area-inset-top))!important;
  }
}


/* ===== V6.5.2 Mobile Route List Scroll Fix ===== */
.table-wrap,
.table-container,
.route-table-wrap,
.route-list-wrap,
#routeTableWrap,
#stopsTableWrap,
#routeList,
#optimizedRouteList,
#routeQueue,
#allStopsQueue{
  max-height:68vh!important;
  overflow-y:auto!important;
  overflow-x:auto!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior:contain!important;
  touch-action:pan-y!important;
  position:relative!important;
}

.card:has(table){
  overflow:visible!important;
}
.card:has(table) .table-wrap,
.card:has(table) .table-container{
  max-height:68vh!important;
  overflow-y:auto!important;
}

table thead th{
  position:sticky!important;
  top:0!important;
  z-index:6!important;
}

tbody tr,
.route-row,
.stop-row{
  touch-action:pan-y!important;
}

.drag-handle,
.grip{
  touch-action:none!important;
  user-select:none!important;
  -webkit-user-select:none!important;
}

main,
.route-list-wrap,
.table-wrap,
.table-container{
  padding-bottom:110px!important;
}

.card,
section.card{
  overflow:visible!important;
}

@supports(height:100dvh){
  .table-wrap,
  .table-container,
  .route-table-wrap,
  .route-list-wrap,
  #routeTableWrap,
  #stopsTableWrap,
  #routeList,
  #optimizedRouteList,
  #routeQueue,
  #allStopsQueue{
    max-height:calc(100dvh - 250px)!important;
  }
}

.table-wrap::-webkit-scrollbar,
.table-container::-webkit-scrollbar,
.route-list-wrap::-webkit-scrollbar{
  width:5px;
}
.table-wrap::-webkit-scrollbar-thumb,
.table-container::-webkit-scrollbar-thumb,
.route-list-wrap::-webkit-scrollbar-thumb{
  background:rgba(96,165,250,.65);
  border-radius:999px;
}


/* ===== V6.5.3 Duplicate Form Cleanup ===== */

/* Hide duplicate legacy upload/import area */
#fileDocument,
#fileCamera,
#chooseDocument,
#takePhoto{
  /* controls remain in DOM for the new top buttons */
}

/* Hide duplicate legacy labels/fields/sections while preserving elements for JS */
.v653-legacy-hidden{
  display:none!important;
}


/* ===== V6.5.4 Analytics Settings + Undo Readability ===== */
.v654-home-hidden{display:none!important}

#undoLastAction,
.undo-btn#undoLastAction{
  background:linear-gradient(135deg,#1d4ed8,#2563eb)!important;
  color:#ffffff!important;
  border:1px solid rgba(147,197,253,.38)!important;
  box-shadow:0 10px 24px rgba(37,99,235,.24)!important;
  opacity:1!important;
  text-shadow:none!important;
}
#undoLastAction:disabled,
.undo-btn#undoLastAction:disabled{
  background:#18304f!important;
  color:#cbd5e1!important;
  border-color:rgba(148,163,184,.28)!important;
  box-shadow:none!important;
  opacity:.82!important;
  -webkit-text-fill-color:#cbd5e1!important;
}

.v654-analytics-sheet .v6-settings-panel{
  background:linear-gradient(180deg,#0b1526,#07111f)!important;
  color:#fff!important;
}
#v654AnalyticsMount > .card{
  display:block!important;
  margin:16px 0 0!important;
  padding:20px!important;
  box-shadow:none!important;
}
#v654AnalyticsMount .analytics-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
#v654AnalyticsMount .metric{
  background:linear-gradient(180deg,#17243a,#101b2e)!important;
  border:1px solid rgba(148,163,184,.18)!important;
}
#v654AnalyticsMount .metric strong{color:#fff!important}
#v654AnalyticsMount .metric .small{color:#9fb0c8!important}


/* ===== V6.5.5 Route Summary + Delivery Dashboard Merge ===== */
.v655-summary-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-top:14px;
}
.v655-summary-grid .v65-metric{
  min-height:104px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}
.v655-summary-grid .v65-metric strong{
  font-size:25px!important;
}
.v655-gps-section{
  margin-top:16px;
  padding-top:16px;
  border-top:1px solid rgba(148,163,184,.16);
}
.v655-section-title{
  color:#f8fafc;
  font-size:16px;
  font-weight:850;
  margin-bottom:10px;
}
.v655-gps-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.v655-gps-actions button{
  flex:1 1 150px;
}
#v655GpsStatusMount #gpsStatus{
  margin-top:10px!important;
  color:#9fb0c8!important;
}
.v655-legacy-dashboard-hidden{
  display:none!important;
}
@media(max-width:680px){
  .v655-summary-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}


/* ===== V6.5.6 Route Flow + Review Scroll Fix ===== */
.tablewrap{
  width:100%!important;
  max-height:min(62vh,620px)!important;
  overflow:auto!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior:contain!important;
  touch-action:pan-x pan-y!important;
  position:relative!important;
  border:1px solid rgba(148,163,184,.22)!important;
  border-radius:20px!important;
  padding-bottom:18px!important;
}
.tablewrap table{
  min-width:760px!important;
  width:max-content!important;
}
.tablewrap thead th{
  position:sticky!important;
  top:0!important;
  z-index:8!important;
}
.tablewrap::-webkit-scrollbar{
  width:5px;
  height:5px;
}
.tablewrap::-webkit-scrollbar-thumb{
  background:rgba(96,165,250,.72);
  border-radius:999px;
}
#v65CreateRoute[data-busy="true"]{
  opacity:.78!important;
  pointer-events:none!important;
}
#v656FlowStatus{
  margin-top:10px;
  color:#bfdbfe;
  font-size:13px;
  line-height:1.45;
}


/* ===== V6.5.7 Premium Polish ===== */
:root{
  --p57-bg:#020611;
  --p57-panel:#081321;
  --p57-panel2:#0d1a2d;
  --p57-line:rgba(148,163,184,.16);
  --p57-text:#f8fafc;
  --p57-muted:#94a3b8;
  --p57-blue:#3b82f6;
  --p57-cyan:#38bdf8;
  --p57-violet:#7c3aed;
}

/* Global visual polish */
body{
  background:
    radial-gradient(circle at 88% 0%,rgba(37,99,235,.18),transparent 28%),
    radial-gradient(circle at 14% 18%,rgba(56,189,248,.075),transparent 26%),
    linear-gradient(180deg,#020611 0%,#06101e 100%)!important;
  letter-spacing:-.01em;
}
main{
  max-width:860px!important;
}
header{
  border-bottom-left-radius:38px!important;
  border-bottom-right-radius:38px!important;
  background:
    linear-gradient(120deg,rgba(255,255,255,.035),transparent 35%),
    radial-gradient(circle at 82% 18%,rgba(59,130,246,.26),transparent 25%),
    linear-gradient(145deg,#020617,#09172a 62%,#173e98)!important;
  box-shadow:0 34px 80px rgba(0,0,0,.44)!important;
}
header h1{
  font-weight:920!important;
  letter-spacing:-1.7px!important;
}
header p{
  color:rgba(255,255,255,.68)!important;
  max-width:620px;
}

/* Premium cards */
.card,
section.card{
  border-radius:30px!important;
  background:
    linear-gradient(180deg,rgba(14,28,48,.985),rgba(7,17,31,.985))!important;
  border:1px solid rgba(148,163,184,.14)!important;
  box-shadow:
    0 28px 72px rgba(0,0,0,.30),
    inset 0 1px 0 rgba(255,255,255,.035)!important;
}
.card::before{
  content:"";
  display:block;
  height:1px;
  background:linear-gradient(90deg,transparent,rgba(125,211,252,.35),transparent);
  opacity:.55;
}

/* Typography */
h2,h3,.v65-title,.v655-section-title{
  letter-spacing:-.6px!important;
}
.v65-title{
  font-size:25px!important;
}
.v65-sub,.small,.muted{
  line-height:1.55!important;
}

/* Inputs */
input,textarea,select{
  border-radius:18px!important;
  background:
    linear-gradient(180deg,rgba(3,10,21,.92),rgba(6,15,27,.92))!important;
  border:1px solid rgba(148,163,184,.20)!important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.025),
    0 8px 18px rgba(0,0,0,.08)!important;
}
input:focus,textarea:focus,select:focus{
  outline:none!important;
  border-color:rgba(96,165,250,.75)!important;
  box-shadow:
    0 0 0 4px rgba(59,130,246,.12),
    inset 0 1px 0 rgba(255,255,255,.03)!important;
}

/* Buttons */
button{
  border-radius:18px!important;
  font-weight:850!important;
  letter-spacing:-.15px;
}
button.primary,.primary{
  background:
    linear-gradient(135deg,#4f46e5 0%,#2563eb 50%,#0ea5e9 100%)!important;
  box-shadow:
    0 16px 34px rgba(37,99,235,.28),
    inset 0 1px 0 rgba(255,255,255,.28)!important;
}
button.soft,.soft{
  background:
    linear-gradient(180deg,rgba(30,41,59,.96),rgba(19,31,49,.96))!important;
  border:1px solid rgba(148,163,184,.14)!important;
}
button:active{
  transform:scale(.985);
}

/* Home route builder */
.v65-builder{
  padding:24px!important;
}
.v65-upload-card{
  border-radius:22px!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035);
}
.v65-upload-card.primary{
  background:
    linear-gradient(135deg,#4f46e5 0%,#2563eb 55%,#06b6d4 100%)!important;
}
.v65-field{
  border-radius:20px!important;
  background:
    linear-gradient(180deg,rgba(15,27,46,.86),rgba(9,19,34,.86))!important;
  border:1px solid rgba(148,163,184,.14)!important;
}

/* Route summary */
#v655MergedSummary{
  padding:22px!important;
}
.v655-summary-grid{
  gap:11px!important;
}
.v655-summary-grid .v65-metric{
  min-height:112px!important;
  border-radius:21px!important;
  background:
    linear-gradient(180deg,rgba(24,39,63,.92),rgba(13,27,46,.92))!important;
  border:1px solid rgba(148,163,184,.13)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
}
.v655-summary-grid .v65-metric strong{
  font-size:27px!important;
}
.v65-actions button{
  min-height:58px!important;
}

/* GPS section */
.v655-gps-section{
  border-top-color:rgba(148,163,184,.14)!important;
}
.v655-gps-actions button{
  min-height:56px!important;
}

/* Tables */
.tablewrap{
  border-radius:22px!important;
  background:#07111f!important;
  box-shadow:inset 0 0 0 1px rgba(148,163,184,.08);
}
table{
  border-spacing:0!important;
}
thead th{
  background:#14243b!important;
  font-size:13px!important;
  text-transform:none;
  letter-spacing:.01em;
}
tbody td{
  padding-top:16px!important;
  padding-bottom:16px!important;
}
tbody tr{
  transition:background .15s ease;
}
tbody tr:active td{
  background:#102844!important;
}

/* Drag handles and route actions */
.drag-handle,.grip{
  border-radius:16px!important;
  background:
    linear-gradient(180deg,#18243a,#111c2e)!important;
  border:1px solid rgba(148,163,184,.12)!important;
}
.route-row button,.stop-row button,table button{
  border-radius:16px!important;
}

/* Settings */
.v6-settings-panel{
  border-radius:32px!important;
  background:
    linear-gradient(180deg,#0c1729,#07111f)!important;
  box-shadow:0 34px 92px rgba(0,0,0,.52)!important;
}
.v62-settings-card,.v61-settings-section{
  border-radius:22px!important;
}

/* Bottom navigation */
.v6-bottom-nav{
  border-radius:28px!important;
  padding:8px!important;
  background:
    linear-gradient(180deg,rgba(3,8,19,.98),rgba(1,5,13,.98))!important;
  border:1px solid rgba(148,163,184,.12)!important;
  box-shadow:
    0 28px 76px rgba(0,0,0,.56),
    inset 0 1px 0 rgba(255,255,255,.035)!important;
}
.v6-bottom-nav button{
  min-height:64px!important;
  border-radius:19px!important;
}
.v6-bottom-nav button.active{
  background:
    linear-gradient(145deg,rgba(37,99,235,.74),rgba(14,165,233,.24))!important;
  box-shadow:
    0 12px 28px rgba(37,99,235,.22),
    inset 0 1px 0 rgba(255,255,255,.12)!important;
}

/* Better mobile density */
@media(max-width:620px){
  .card,section.card{
    border-radius:26px!important;
  }
  .v65-builder,#v655MergedSummary{
    padding:19px!important;
  }
  .v655-summary-grid{
    gap:9px!important;
  }
}


/* ===== V6.5.8 Responsive Address Review + Route Tables ===== */

/* No horizontal scrolling for mobile route/review tables */
.tablewrap{
  overflow-x:hidden!important;
  overflow-y:auto!important;
  max-width:100%!important;
  width:100%!important;
  padding-bottom:18px!important;
}

.tablewrap table{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  table-layout:fixed!important;
}

/* Allow all content to wrap inside viewport */
.tablewrap th,
.tablewrap td{
  min-width:0!important;
  max-width:none!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:break-word!important;
}

/* Route list table column sizing */
.tablewrap table:has(button[id^="google"]),
.tablewrap table:has(button[class*="google"]),
.tablewrap table:has(button[id*="current"]),
.tablewrap table:has(button[class*="current"]){
  table-layout:fixed!important;
}

.tablewrap th:nth-child(1),
.tablewrap td:nth-child(1){
  width:8%!important;
}

.tablewrap th:nth-child(2),
.tablewrap td:nth-child(2){
  width:8%!important;
}

.tablewrap th:nth-child(3),
.tablewrap td:nth-child(3){
  width:43%!important;
}

.tablewrap th:nth-child(4),
.tablewrap td:nth-child(4){
  width:16%!important;
}

.tablewrap th:nth-child(5),
.tablewrap td:nth-child(5){
  width:25%!important;
}

/* Action buttons stay visible and compact */
.tablewrap td:last-child{
  padding-left:6px!important;
  padding-right:6px!important;
}

.tablewrap td:last-child button{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  min-height:46px!important;
  padding:9px 6px!important;
  font-size:12px!important;
  line-height:1.15!important;
  white-space:normal!important;
}

/* Address Matching Review layout */
#matchReview table,
#addressReview table,
table[data-review-table],
.tablewrap table:has(th:nth-child(5)){
  table-layout:fixed!important;
}

#matchReview th:nth-child(1),
#matchReview td:nth-child(1),
#addressReview th:nth-child(1),
#addressReview td:nth-child(1){
  width:7%!important;
}

#matchReview th:nth-child(2),
#matchReview td:nth-child(2),
#addressReview th:nth-child(2),
#addressReview td:nth-child(2){
  width:25%!important;
}

#matchReview th:nth-child(3),
#matchReview td:nth-child(3),
#addressReview th:nth-child(3),
#addressReview td:nth-child(3){
  width:30%!important;
}

#matchReview th:nth-child(4),
#matchReview td:nth-child(4),
#addressReview th:nth-child(4),
#addressReview td:nth-child(4){
  width:23%!important;
}

#matchReview th:nth-child(5),
#matchReview td:nth-child(5),
#addressReview th:nth-child(5),
#addressReview td:nth-child(5){
  width:15%!important;
}

/* Smaller mobile typography */
@media(max-width:620px){
  .tablewrap th{
    font-size:11px!important;
    padding:10px 5px!important;
  }

  .tablewrap td{
    font-size:12px!important;
    padding:12px 5px!important;
    line-height:1.35!important;
  }

  .tablewrap td:nth-child(3){
    font-size:12px!important;
  }

  .tablewrap td:last-child button{
    font-size:11px!important;
    padding:8px 4px!important;
  }

  .drag-handle,
  .grip{
    width:38px!important;
    min-width:38px!important;
    height:52px!important;
    padding:0!important;
  }
}

/* Very small iPhones */
@media(max-width:390px){
  .tablewrap th:nth-child(1),
  .tablewrap td:nth-child(1){
    width:7%!important;
  }

  .tablewrap th:nth-child(2),
  .tablewrap td:nth-child(2){
    width:7%!important;
  }

  .tablewrap th:nth-child(3),
  .tablewrap td:nth-child(3){
    width:44%!important;
  }

  .tablewrap th:nth-child(4),
  .tablewrap td:nth-child(4){
    width:16%!important;
  }

  .tablewrap th:nth-child(5),
  .tablewrap td:nth-child(5){
    width:26%!important;
  }

  .tablewrap td{
    font-size:11px!important;
  }
}


/* ===== V6.6 Native App Experience ===== */
body{
  padding-top:calc(72px + env(safe-area-inset-top))!important;
}

/* Compact native-style top app bar */
.v66-appbar{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:99980;
  height:calc(64px + env(safe-area-inset-top));
  padding:
    calc(10px + env(safe-area-inset-top))
    16px
    10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:rgba(3,7,18,.82);
  border-bottom:1px solid rgba(148,163,184,.12);
  backdrop-filter:blur(22px);
  -webkit-backdrop-filter:blur(22px);
}
.v66-brand{
  display:flex;
  align-items:center;
  gap:11px;
}
.v66-logo{
  width:42px;
  height:42px;
  border-radius:14px;
  display:grid;
  place-items:center;
  color:#fff;
  font-weight:950;
  letter-spacing:-1px;
  background:
    radial-gradient(circle at 30% 20%,rgba(255,255,255,.28),transparent 28%),
    linear-gradient(145deg,#4f46e5,#2563eb 58%,#06b6d4);
  box-shadow:
    0 10px 24px rgba(37,99,235,.28),
    inset 0 1px 0 rgba(255,255,255,.35);
}
.v66-brand-title{
  color:#fff;
  font-size:16px;
  font-weight:900;
  letter-spacing:-.35px;
}
.v66-brand-sub{
  color:#94a3b8;
  font-size:11px;
  margin-top:2px;
}
.v66-privacy-chip{
  padding:7px 10px;
  border-radius:999px;
  color:#a7f3d0;
  font-size:11px;
  font-weight:850;
  background:rgba(16,185,129,.12);
  border:1px solid rgba(52,211,153,.22);
}

/* Hide oversized legacy header visually, keep in DOM */
header{
  display:none!important;
}

/* App page entrance */
main{
  animation:v66PageIn .35s ease both;
}
@keyframes v66PageIn{
  from{opacity:0;transform:translateY(8px)}
  to{opacity:1;transform:none}
}

/* Native press feedback */
button,
.v65-upload-card,
.v65-action,
.v62-settings-card{
  -webkit-tap-highlight-color:transparent;
  transition:
    transform .14s ease,
    box-shadow .18s ease,
    opacity .18s ease!important;
}
button:active,
.v65-upload-card:active,
.v65-action:active,
.v62-settings-card:active{
  transform:scale(.975)!important;
}

/* Native toast */
#v66Toast{
  position:fixed;
  left:50%;
  bottom:calc(102px + env(safe-area-inset-bottom));
  transform:translateX(-50%) translateY(18px);
  z-index:100100;
  width:min(460px,calc(100% - 28px));
  padding:13px 16px;
  border-radius:17px;
  color:#fff;
  font-size:13px;
  font-weight:800;
  text-align:center;
  background:rgba(15,23,42,.96);
  border:1px solid rgba(148,163,184,.16);
  box-shadow:0 22px 60px rgba(0,0,0,.42);
  opacity:0;
  visibility:hidden;
  transition:opacity .22s ease,transform .22s ease,visibility .22s ease;
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
#v66Toast.show{
  opacity:1;
  visibility:visible;
  transform:translateX(-50%) translateY(0);
}

/* Floating continue route button */
#v66ContinueRoute{
  position:fixed;
  right:16px;
  bottom:calc(92px + env(safe-area-inset-bottom));
  z-index:99970;
  display:none;
  min-height:54px!important;
  padding:0 18px!important;
  border-radius:999px!important;
  background:
    linear-gradient(135deg,#4f46e5,#2563eb 58%,#06b6d4)!important;
  color:#fff!important;
  box-shadow:
    0 18px 38px rgba(37,99,235,.34),
    inset 0 1px 0 rgba(255,255,255,.28)!important;
}
#v66ContinueRoute.show{
  display:inline-flex;
  align-items:center;
  gap:8px;
  animation:v66FloatIn .28s ease both;
}
@keyframes v66FloatIn{
  from{opacity:0;transform:translateY(10px) scale(.96)}
  to{opacity:1;transform:none}
}

/* Loading shimmer */
.v66-loading{
  position:relative;
  overflow:hidden!important;
}
.v66-loading::after{
  content:"";
  position:absolute;
  inset:0;
  transform:translateX(-100%);
  background:linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,.10),
    transparent
  );
  animation:v66Shimmer 1.15s linear infinite;
}
@keyframes v66Shimmer{
  to{transform:translateX(100%)}
}

/* Bottom nav more native */
.v6-bottom-nav{
  bottom:max(10px,env(safe-area-inset-bottom))!important;
  border-radius:26px!important;
  padding:7px!important;
}
.v6-bottom-nav button{
  min-height:60px!important;
}
.v6-bottom-nav button span:first-child{
  font-size:19px!important;
}
.v6-bottom-nav button span:last-child{
  font-size:10px!important;
  font-weight:800!important;
}

/* Safe-area and modal polish */
.v6-settings-sheet,
.v62-detail-sheet,
.v64-dashboard-sheet{
  padding-bottom:max(16px,env(safe-area-inset-bottom))!important;
}
.v6-settings-panel{
  max-height:calc(100dvh - 28px - env(safe-area-inset-top))!important;
}

/* Route status pulse */
#v65RouteStatus{
  position:relative;
  padding-left:22px!important;
}
#v65RouteStatus::before{
  content:"";
  position:absolute;
  left:9px;
  top:50%;
  width:7px;
  height:7px;
  margin-top:-3.5px;
  border-radius:50%;
  background:#64748b;
}
#v65RouteStatus[data-ready="true"]::before{
  background:#34d399;
  box-shadow:0 0 0 6px rgba(52,211,153,.10);
}


/* ===== V6.6.1 Fixed Top & Bottom App Bars ===== */

html{
  height:100%;
  overflow-x:hidden!important;
}

body{
  min-height:100%;
  overflow-x:hidden!important;
  padding-top:calc(76px + env(safe-area-inset-top))!important;
  padding-bottom:calc(104px + env(safe-area-inset-bottom))!important;
}

/* Fixed top app bar */
.v66-appbar{
  position:fixed!important;
  top:0!important;
  left:0!important;
  right:0!important;
  bottom:auto!important;
  width:100%!important;
  height:calc(64px + env(safe-area-inset-top))!important;
  z-index:2147483000!important;
  transform:translate3d(0,0,0)!important;
  -webkit-transform:translate3d(0,0,0)!important;
  will-change:transform;
  isolation:isolate;
  contain:layout paint style;
  margin:0!important;
}

/* Fixed bottom navigation */
.v6-bottom-nav{
  position:fixed!important;
  left:50%!important;
  right:auto!important;
  top:auto!important;
  bottom:max(10px,env(safe-area-inset-bottom))!important;
  transform:translate3d(-50%,0,0)!important;
  -webkit-transform:translate3d(-50%,0,0)!important;
  z-index:2147482999!important;
  width:min(720px,calc(100% - 22px))!important;
  margin:0!important;
  will-change:transform;
  isolation:isolate;
  contain:layout paint style;
}

/* Keep floating action above bottom nav */
#v66ContinueRoute{
  bottom:calc(96px + env(safe-area-inset-bottom))!important;
  z-index:2147482998!important;
}

/* Keep toast above nav */
#v66Toast{
  bottom:calc(110px + env(safe-area-inset-bottom))!important;
  z-index:2147483001!important;
}

/* Prevent any ancestor animation/transform from affecting fixed bars */
main,
.v65-home-shell,
.v64-dashboard-sheet,
.v6-settings-sheet,
.v62-detail-sheet{
  transform:none!important;
  perspective:none!important;
}

/* Main content never hides behind bars */
main{
  padding-bottom:24px!important;
}

/* Slightly more native separation */
.v66-appbar{
  box-shadow:
    0 10px 30px rgba(0,0,0,.28),
    inset 0 -1px 0 rgba(148,163,184,.10)!important;
}

.v6-bottom-nav{
  box-shadow:
    0 24px 70px rgba(0,0,0,.58),
    inset 0 1px 0 rgba(255,255,255,.04)!important;
}


/* ===== V6.7 Native Pages Edition ===== */
.v67-page{
  display:none;
  min-height:calc(100dvh - 176px);
  animation:v67PageIn .24s ease both;
}
.v67-page.active{display:block}
@keyframes v67PageIn{
  from{opacity:0;transform:translateY(8px)}
  to{opacity:1;transform:none}
}

.v67-map-wrap{
  position:relative;
  border-radius:28px;
  overflow:hidden;
  border:1px solid rgba(148,163,184,.16);
  box-shadow:0 28px 72px rgba(0,0,0,.28);
}
.v67-map-wrap #map{
  border-radius:0!important;
  min-height:62vh!important;
}
.v67-eta-card{
  position:absolute;
  left:14px;
  right:14px;
  top:14px;
  z-index:500;
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  padding:14px 16px;
  border-radius:20px;
  background:rgba(4,12,24,.86);
  border:1px solid rgba(148,163,184,.16);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  box-shadow:0 18px 42px rgba(0,0,0,.28);
}
.v67-eta-main{
  color:#fff;
  font-size:20px;
  font-weight:900;
}
.v67-eta-sub{
  margin-top:3px;
  color:#94a3b8;
  font-size:12px;
}
.v67-eta-chip{
  padding:8px 11px;
  border-radius:999px;
  color:#bfdbfe;
  background:rgba(37,99,235,.14);
  border:1px solid rgba(59,130,246,.22);
  font-size:12px;
  font-weight:850;
}

.v67-current-stop{
  margin-top:16px;
  padding:18px;
  border-radius:24px;
  background:linear-gradient(180deg,rgba(15,29,49,.98),rgba(7,17,31,.98));
  border:1px solid rgba(148,163,184,.16);
  box-shadow:0 22px 58px rgba(0,0,0,.22);
}
.v67-current-label{
  color:#94a3b8;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:1.6px;
  font-weight:850;
}
.v67-current-address{
  margin-top:7px;
  color:#fff;
  font-size:18px;
  font-weight:900;
  line-height:1.35;
}
.v67-current-meta{
  margin-top:7px;
  color:#9fb0c8;
  font-size:13px;
}
.v67-current-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:14px;
}

.v67-settings-group{
  margin-top:18px;
}
.v67-settings-group-title{
  padding:0 14px 8px;
  color:#64748b;
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:1.3px;
}
.v67-settings-list{
  overflow:hidden;
  border-radius:22px;
  background:linear-gradient(180deg,#0d1a2d,#091321);
  border:1px solid rgba(148,163,184,.14);
  box-shadow:0 18px 46px rgba(0,0,0,.20);
}
.v67-settings-row{
  display:flex;
  align-items:center;
  gap:12px;
  min-height:64px;
  padding:12px 14px;
  border-bottom:1px solid rgba(148,163,184,.11);
}
.v67-settings-row:last-child{border-bottom:0}
.v67-settings-icon{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:12px;
  color:#fff;
  font-weight:900;
  background:linear-gradient(145deg,#4f46e5,#2563eb 58%,#06b6d4);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22);
}
.v67-settings-copy{
  flex:1;
}
.v67-settings-copy b{
  display:block;
  color:#fff;
}
.v67-settings-copy span{
  display:block;
  margin-top:2px;
  color:#94a3b8;
  font-size:12px;
}
.v67-settings-chevron{
  color:#64748b;
  font-size:22px;
}

@media(max-width:620px){
  .v67-map-wrap #map{min-height:56vh!important}
  .v67-current-actions{grid-template-columns:1fr}
}


/* ===== V6.7.1 Safe-Area Layout Fix ===== */
:root{
  --v671-topbar:calc(64px + env(safe-area-inset-top));
  --v671-bottombar:calc(86px + env(safe-area-inset-bottom));
}

/* Body only scrolls the page content */
html,body{
  min-height:100%;
  overflow-x:hidden!important;
}
body{
  padding-top:var(--v671-topbar)!important;
  padding-bottom:var(--v671-bottombar)!important;
}

/* Native pages always stay between fixed bars */
main{
  width:100%!important;
  min-height:calc(100dvh - var(--v671-topbar) - var(--v671-bottombar))!important;
  padding:
    18px
    14px
    calc(30px + var(--v671-bottombar))!important;
  margin:0 auto!important;
  box-sizing:border-box!important;
}

.v67-page{
  min-height:calc(100dvh - var(--v671-topbar) - var(--v671-bottombar) - 36px)!important;
  padding-top:8px!important;
  padding-bottom:calc(34px + var(--v671-bottombar))!important;
  box-sizing:border-box!important;
}

/* Settings page gets extra breathing room */
#v67SettingsPage{
  padding-top:18px!important;
  padding-bottom:calc(44px + var(--v671-bottombar))!important;
}

/* Prevent first heading from sliding under the fixed app bar */
#v67SettingsPage > :first-child,
#v67HomePage > :first-child,
#v67RoutePage > :first-child,
#v67DashboardPage > :first-child,
#v67StatsPage > :first-child{
  margin-top:0!important;
}

/* Settings cards and sheets remain fully scrollable */
.v6-settings-sheet,
.v62-detail-sheet,
.v64-dashboard-sheet{
  top:var(--v671-topbar)!important;
  bottom:var(--v671-bottombar)!important;
  height:auto!important;
  padding:
    14px
    14px
    18px!important;
  align-items:flex-start!important;
  overflow-y:auto!important;
  -webkit-overflow-scrolling:touch!important;
  box-sizing:border-box!important;
}

.v6-settings-panel{
  width:min(720px,100%)!important;
  max-height:none!important;
  min-height:auto!important;
  margin:0 auto!important;
  padding:
    22px
    20px
    calc(34px + env(safe-area-inset-bottom))!important;
  overflow:visible!important;
  box-sizing:border-box!important;
}

/* API Vault content must not be hidden behind bottom navigation */
#apiKeyVaultCard,
#v61VaultMount,
#v62SecureSheet,
#v67SettingsPage{
  scroll-margin-top:calc(var(--v671-topbar) + 14px)!important;
  scroll-margin-bottom:calc(var(--v671-bottombar) + 22px)!important;
}

/* Add safe end spacer to all native pages */
.v67-page::after{
  content:"";
  display:block;
  height:calc(var(--v671-bottombar) + 28px);
  width:100%;
  pointer-events:none;
}

/* Keep fixed bars above content, but not inside scrolling flow */
.v66-appbar{
  top:0!important;
  height:var(--v671-topbar)!important;
}
.v6-bottom-nav{
  bottom:max(10px,env(safe-area-inset-bottom))!important;
}

/* Small iPhones */
@media(max-width:430px){
  main{
    padding-left:10px!important;
    padding-right:10px!important;
  }
  .v6-settings-panel{
    padding-left:16px!important;
    padding-right:16px!important;
  }
}


/* ===== V6.8 Exact Premium Theme ===== */
:root{
  --v68-bg:#020611;
  --v68-panel:#07111f;
  --v68-panel-2:#0b1728;
  --v68-line:rgba(148,163,184,.22);
  --v68-blue:#0ea5ff;
  --v68-indigo:#3f4df7;
  --v68-violet:#9333ea;
  --v68-text:#f8fafc;
  --v68-muted:#a8b4c8;
}

body{
  background:
    radial-gradient(circle at 84% 0%,rgba(20,94,255,.18),transparent 28%),
    radial-gradient(circle at 10% 10%,rgba(14,165,255,.08),transparent 24%),
    linear-gradient(180deg,#020611 0%,#06101e 100%)!important;
}

/* Top app bar */
.v66-appbar{
  min-height:96px!important;
  height:calc(96px + env(safe-area-inset-top))!important;
  padding:
    calc(14px + env(safe-area-inset-top))
    18px
    14px!important;
  background:
    radial-gradient(circle at 18% 30%,rgba(56,189,248,.10),transparent 24%),
    linear-gradient(180deg,rgba(2,6,17,.98),rgba(3,9,22,.96))!important;
  border-bottom:1px solid rgba(59,130,246,.46)!important;
  box-shadow:
    0 10px 36px rgba(0,0,0,.42),
    0 2px 0 rgba(14,165,233,.42)!important;
}
.v66-brand{
  gap:14px!important;
}
.v66-logo{
  width:92px!important;
  height:58px!important;
  border-radius:0!important;
  background:none!important;
  box-shadow:none!important;
  position:relative;
  font-size:0!important;
}
.v66-logo::before{
  content:"GP";
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:46px;
  font-weight:950;
  font-style:italic;
  letter-spacing:-5px;
  color:transparent;
  background:
    linear-gradient(180deg,#ffffff 0%,#d7e5f7 30%,#7f8ea5 55%,#f3f7fb 72%,#78859a 100%);
  -webkit-background-clip:text;
  background-clip:text;
  text-shadow:
    0 3px 0 #101827,
    0 0 14px rgba(56,189,248,.55);
  filter:drop-shadow(0 8px 12px rgba(0,0,0,.45));
}
.v66-logo::after{
  content:"";
  position:absolute;
  left:8px;
  right:4px;
  bottom:3px;
  height:16px;
  border-bottom:3px solid #1677ff;
  border-radius:50%;
  box-shadow:
    0 0 12px #1677ff,
    0 0 22px rgba(14,165,233,.7);
  transform:rotate(-6deg);
}
.v66-brand-title{
  font-size:24px!important;
  line-height:1.1!important;
  letter-spacing:-.7px!important;
}
.v66-brand-sub{
  font-size:13px!important;
  color:#c1cad8!important;
}
.v66-privacy-chip{
  font-size:12px!important;
  padding:10px 14px!important;
  background:rgba(16,185,129,.10)!important;
  border-color:rgba(52,211,153,.28)!important;
}

/* Main offset for taller bar */
body{
  padding-top:calc(108px + env(safe-area-inset-top))!important;
}
main{
  padding-top:18px!important;
}

/* Home builder card */
.v65-builder{
  border:1px solid rgba(59,130,246,.52)!important;
  box-shadow:
    0 0 0 1px rgba(14,165,233,.12),
    0 0 28px rgba(37,99,235,.18),
    0 28px 70px rgba(0,0,0,.36)!important;
}
.v65-builder::before{
  background:linear-gradient(90deg,transparent,#1677ff,transparent)!important;
  opacity:.9!important;
}

/* Upload buttons */
.v65-upload-card{
  min-height:122px!important;
  border:1px solid rgba(59,130,246,.28)!important;
}
.v65-upload-card.soft{
  background:linear-gradient(180deg,#0c1729,#08111f)!important;
}
.v65-upload-card.primary{
  background:
    linear-gradient(135deg,#4f46e5 0%,#2563eb 50%,#0ea5e9 100%)!important;
  box-shadow:
    0 18px 36px rgba(37,99,235,.30),
    inset 0 1px 0 rgba(255,255,255,.26)!important;
}

/* Start / End route fields */
.v65-field{
  position:relative;
  padding-left:76px!important;
  min-height:96px!important;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
.v65-field label{
  font-size:14px!important;
  color:#ffffff!important;
}
.v65-field input{
  border:0!important;
  background:transparent!important;
  padding-left:0!important;
  box-shadow:none!important;
  min-height:42px!important;
}
.v65-field:has(#v65Start)::before,
.v65-field:has(#v65End)::before{
  position:absolute;
  left:16px;
  top:50%;
  transform:translateY(-50%);
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  border-radius:15px;
  font-size:27px;
  font-weight:900;
}
.v65-field:has(#v65Start)::before{
  content:"●";
  color:#ffffff;
  background:
    radial-gradient(circle at 50% 42%,#ffffff 0 12%,transparent 13%),
    radial-gradient(circle at 50% 50%,#1677ff 0 45%,#0a3c8a 46% 100%);
  box-shadow:
    0 0 16px rgba(22,119,255,.78),
    inset 0 1px 0 rgba(255,255,255,.25);
}
.v65-field:has(#v65Start)::after{
  content:"";
  position:absolute;
  left:38px;
  top:calc(50% + 28px);
  width:2px;
  height:44px;
  background:linear-gradient(#1677ff,transparent);
  box-shadow:0 0 8px #1677ff;
}
.v65-field:has(#v65End)::before{
  content:"⚑";
  color:#ffffff;
  background:
    linear-gradient(145deg,#1b1534,#2a1552);
  border:1px solid rgba(168,85,247,.55);
  box-shadow:
    0 0 16px rgba(147,51,234,.48),
    inset 0 1px 0 rgba(255,255,255,.14);
}
.v65-field:has(#v65End){
  margin-top:18px!important;
}

/* Navigation field */
.v65-field:has(#v65Navigation),
.v65-field:has(#v65Mode){
  padding-left:16px!important;
  min-height:auto!important;
}
.v65-field:has(#v65Navigation)::before,
.v65-field:has(#v65Mode)::before{
  display:none!important;
}

/* Main CTA */
.v65-create{
  background:
    linear-gradient(135deg,#4f46e5 0%,#2563eb 58%,#0ea5e9 100%)!important;
  box-shadow:
    0 0 22px rgba(37,99,235,.28),
    0 18px 34px rgba(37,99,235,.24)!important;
}

/* Route Summary */
#v655MergedSummary{
  border:1px solid rgba(148,163,184,.18)!important;
}
.v655-summary-grid .v65-metric{
  background:
    linear-gradient(180deg,#101d31,#0b1628)!important;
  border-color:rgba(148,163,184,.17)!important;
}
.v655-summary-grid .v65-metric:nth-child(1) strong{color:#3b82f6!important}
.v655-summary-grid .v65-metric:nth-child(2) strong{color:#34d399!important}
.v655-summary-grid .v65-metric:nth-child(3) strong{color:#a855f7!important}
.v655-summary-grid .v65-metric:nth-child(4) strong{color:#fbbf24!important}

/* Bottom navigation */
.v6-bottom-nav{
  background:
    linear-gradient(180deg,rgba(5,11,24,.98),rgba(2,6,16,.98))!important;
  border:1px solid rgba(148,163,184,.17)!important;
}
.v6-bottom-nav button.active{
  background:
    radial-gradient(circle at 50% 20%,rgba(59,130,246,.22),transparent 55%),
    linear-gradient(145deg,rgba(37,99,235,.42),rgba(14,165,233,.14))!important;
  border:1px solid rgba(59,130,246,.62)!important;
  box-shadow:
    0 0 20px rgba(37,99,235,.34),
    inset 0 1px 0 rgba(255,255,255,.08)!important;
}

/* Exact card radii and spacing */
.card,section.card{
  border-radius:28px!important;
}
.v65-actions{
  gap:12px!important;
}
.v65-actions button{
  border:1px solid rgba(148,163,184,.15)!important;
}

/* Keep pages clear of the larger top bar */
:root{
  --v671-topbar:calc(108px + env(safe-area-inset-top))!important;
}


/* ===== V6.8.1 Clean Home ===== */
#v65Optimise,#v65RouteMap,#v65Clear,.v65-actions{display:none!important}
#v67HomePage .privacy-box,
#v67HomePage section:has(.privacy-box){display:none!important}
#v67SettingsPage .privacy-box,
.v6-settings-sheet .privacy-box,
.v62-detail-sheet .privacy-box,
#v62PrivacySheet .privacy-box{display:block!important}


/* ===== V6.8.2 Restore Home Route Map ===== */
.v682-home-map-card{
  margin-top:18px!important;
  padding:20px!important;
}
.v682-map-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:14px;
}
.v682-map-shell{
  position:relative;
  overflow:hidden;
  border-radius:24px;
  border:1px solid rgba(148,163,184,.18);
  background:#dbeafe;
  min-height:420px;
  box-shadow:
    0 22px 56px rgba(0,0,0,.24),
    inset 0 1px 0 rgba(255,255,255,.08);
}
#v682HomeMapMount,
#v682HomeMapMount #map{
  width:100%!important;
  min-height:420px!important;
  height:420px!important;
}
#v682HomeMapMount .leaflet-container{
  border-radius:24px!important;
}
@media(max-width:620px){
  .v682-map-shell,
  #v682HomeMapMount,
  #v682HomeMapMount #map{
    min-height:360px!important;
    height:360px!important;
  }
}


/* ===== V6.8.4 Route & Fuel Settings ===== */
.v684-fuel-card{
  margin-top:14px;
  padding:16px;
  border-radius:20px;
  background:linear-gradient(180deg,#101d31,#0b1628);
  border:1px solid rgba(148,163,184,.16);
}
.v684-fuel-card label{
  display:block;
  margin-bottom:8px;
  color:#fff!important;
  font-weight:850;
}
.v684-fuel-card input{
  width:100%;
}
.v684-fuel-card .small{
  margin-top:7px;
  color:#94a3b8!important;
}


/* ===== V6.9 Premium Multi-Input Builder ===== */
.v65-upload-grid{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
}
.v69-paste-card{
  background:
    linear-gradient(180deg,#101d31,#0b1628)!important;
  border:1px solid rgba(147,51,234,.34)!important;
  box-shadow:
    0 14px 28px rgba(88,28,135,.18),
    inset 0 1px 0 rgba(255,255,255,.04)!important;
}
.v69-help{
  margin-top:14px;
  padding:13px 15px;
  border-radius:17px;
  color:#cbd5e1;
  background:rgba(37,99,235,.10);
  border:1px solid rgba(59,130,246,.18);
  font-size:13px;
  line-height:1.5;
}
#v69MultiInput{
  width:100%;
  min-height:260px!important;
  margin-top:14px;
}
.v69-stats{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin-top:14px;
}
.v69-stats > div{
  padding:14px;
  text-align:center;
  border-radius:18px;
  background:linear-gradient(180deg,#101d31,#0b1628);
  border:1px solid rgba(148,163,184,.16);
}
.v69-stats span{
  display:block;
  color:#94a3b8;
  font-size:12px;
}
.v69-stats strong{
  display:block;
  margin-top:5px;
  color:#fff;
  font-size:24px;
}
@media(max-width:620px){
  .v65-upload-grid{
    grid-template-columns:1fr!important;
  }
}


/* ===== V6.9.1 Visible Postcode Input Fix ===== */
.v65-upload-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important;
}
#v69PastePostcodes{
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
  min-height:122px!important;
}
.v691-postcode-card{
  background:
    linear-gradient(135deg,#4c1d95 0%,#6d28d9 52%,#2563eb 100%)!important;
  border:1px solid rgba(168,85,247,.46)!important;
  box-shadow:
    0 16px 34px rgba(109,40,217,.24),
    inset 0 1px 0 rgba(255,255,255,.20)!important;
}
.v691-postcode-card b{
  color:#fff!important;
}
.v691-postcode-card span{
  color:#e9d5ff!important;
}
@media(max-width:720px){
  .v65-upload-grid{
    grid-template-columns:1fr!important;
  }
  #v69PastePostcodes{
    width:100%!important;
  }
}


/* ===== V6.9.2 Postcode Address Picker ===== */
.v692-picker{
  margin-top:14px;
  padding:16px;
  border-radius:22px;
  background:
    radial-gradient(circle at 100% 0%,rgba(59,130,246,.10),transparent 28%),
    linear-gradient(180deg,#101d31,#0b1628);
  border:1px solid rgba(59,130,246,.24);
}
.v692-picker-title{
  color:#fff;
  font-size:17px;
  font-weight:900;
  margin-bottom:10px;
}
.v692-results{
  display:grid;
  gap:9px;
  max-height:330px;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  margin-top:10px;
  padding-right:2px;
}
.v692-result{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:12px;
  border-radius:16px;
  background:#071321;
  border:1px solid rgba(148,163,184,.16);
}
.v692-result input{
  width:20px!important;
  height:20px!important;
  min-height:20px!important;
  margin-top:2px;
  flex:0 0 auto;
}
.v692-result-copy{
  flex:1;
  min-width:0;
}
.v692-result-address{
  color:#f8fafc;
  font-size:13px;
  font-weight:800;
  line-height:1.4;
}
.v692-result-meta{
  color:#94a3b8;
  font-size:11px;
  margin-top:4px;
}
.v692-empty{
  padding:14px;
  border-radius:15px;
  color:#94a3b8;
  background:rgba(15,23,42,.65);
  text-align:center;
}
@media(max-width:620px){
  .v692-picker .row{
    display:grid!important;
    grid-template-columns:1fr!important;
  }
}


/* ===== V7.0 Driver Mode ===== */
.v70-driver-entry{
  margin-top:16px;
}
.v70-driver-entry button{
  width:100%;
  min-height:62px!important;
  font-size:17px!important;
}

.v70-driver-mode{
  position:fixed;
  inset:0;
  z-index:2147483100;
  display:none;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  padding:
    max(18px,env(safe-area-inset-top))
    16px
    calc(28px + env(safe-area-inset-bottom));
  color:#f8fafc;
  background:
    radial-gradient(circle at 85% 0%,rgba(37,99,235,.22),transparent 28%),
    linear-gradient(180deg,#020611 0%,#07111f 100%);
}
.v70-driver-mode.show{display:block}
.v70-driver-shell{
  width:min(720px,100%);
  margin:0 auto;
}
.v70-driver-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.v70-driver-top h2{
  margin:4px 0 0;
  color:#fff;
  font-size:28px;
  letter-spacing:-.9px;
}
.v70-eyebrow{
  color:#60a5fa;
  font-size:11px;
  font-weight:900;
  letter-spacing:2px;
}
.v70-close{
  min-height:46px!important;
  padding:0 15px!important;
  color:#dbeafe!important;
  background:rgba(30,41,59,.88)!important;
  border:1px solid rgba(148,163,184,.18)!important;
}

.v70-progress-card,
.v70-current-card{
  margin-top:16px;
  border-radius:26px;
  border:1px solid rgba(148,163,184,.16);
  background:linear-gradient(180deg,rgba(15,29,49,.98),rgba(7,17,31,.98));
  box-shadow:0 28px 70px rgba(0,0,0,.30);
}
.v70-progress-card{padding:16px}
.v70-progress-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  color:#cbd5e1;
  font-size:13px;
  font-weight:800;
}
.v70-progress-track{
  height:9px;
  margin-top:12px;
  overflow:hidden;
  border-radius:999px;
  background:#17243a;
}
.v70-progress-fill{
  width:0%;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#2563eb,#22d3ee);
  box-shadow:0 0 14px rgba(34,211,238,.48);
  transition:width .3s ease;
}

.v70-current-card{
  padding:22px;
}
.v70-current-label{
  color:#60a5fa;
  font-size:11px;
  font-weight:900;
  letter-spacing:1.7px;
}
.v70-current-address{
  margin-top:10px;
  color:#fff;
  font-size:24px;
  font-weight:950;
  line-height:1.28;
  letter-spacing:-.6px;
}
.v70-current-meta{
  margin-top:8px;
  color:#9fb0c8;
  font-size:13px;
  line-height:1.5;
}
.v70-metrics{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:9px;
  margin-top:18px;
}
.v70-metrics > div{
  padding:13px 8px;
  text-align:center;
  border-radius:17px;
  background:#101d31;
  border:1px solid rgba(148,163,184,.14);
}
.v70-metrics span{
  display:block;
  color:#94a3b8;
  font-size:11px;
}
.v70-metrics strong{
  display:block;
  margin-top:5px;
  color:#fff;
  font-size:20px;
}
.v70-navigate{
  width:100%;
  min-height:60px!important;
  margin-top:18px;
  color:#fff!important;
  background:linear-gradient(135deg,#4f46e5,#2563eb 58%,#0ea5e9)!important;
  box-shadow:0 18px 38px rgba(37,99,235,.28)!important;
}

.v70-primary-actions{
  display:grid;
  grid-template-columns:1.35fr 1fr;
  gap:11px;
  margin-top:16px;
}
.v70-primary-actions button{
  min-height:72px!important;
  font-size:17px!important;
  font-weight:950!important;
}
.v70-delivered{
  color:#fff!important;
  background:linear-gradient(135deg,#059669,#10b981)!important;
  box-shadow:0 16px 34px rgba(16,185,129,.24)!important;
}
.v70-skip{
  color:#fff!important;
  background:linear-gradient(135deg,#d97706,#f59e0b)!important;
  box-shadow:0 16px 34px rgba(245,158,11,.20)!important;
}
.v70-secondary-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:11px;
  margin-top:11px;
}
.v70-secondary-actions button{
  min-height:56px!important;
}
.v70-driver-status{
  margin-top:14px;
  padding:13px 15px;
  border-radius:16px;
  color:#bfdbfe;
  background:rgba(37,99,235,.10);
  border:1px solid rgba(59,130,246,.18);
  font-size:13px;
  text-align:center;
}
@media(max-width:480px){
  .v70-primary-actions,
  .v70-secondary-actions{
    grid-template-columns:1fr;
  }
  .v70-current-address{font-size:21px}
}


/* ===== V7.0.1 iPhone Navigation Return Hotfix ===== */
html.v701-resuming body::after{
  content:"Restoring route…";
  position:fixed;
  inset:0;
  z-index:2147483646;
  display:grid;
  place-items:center;
  color:#dbeafe;
  font-size:14px;
  font-weight:850;
  background:
    radial-gradient(circle at 50% 40%,rgba(37,99,235,.14),transparent 22%),
    rgba(2,6,17,.96);
  pointer-events:none;
}


/* ===== V7.1 Smart Driver Workflow ===== */
.v71-continue-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-top:16px;
  padding:16px;
  border-radius:22px;
  background:
    radial-gradient(circle at 100% 0%,rgba(59,130,246,.12),transparent 28%),
    linear-gradient(180deg,#101d31,#0b1628);
  border:1px solid rgba(59,130,246,.24);
  box-shadow:0 18px 44px rgba(0,0,0,.22);
}
.v71-continue-title{
  color:#fff;
  font-size:17px;
  font-weight:900;
}
.v71-continue-sub{
  margin-top:4px;
  color:#94a3b8;
  font-size:12px;
}
.v71-search-panel{
  margin-top:16px;
  padding:16px;
  border-radius:22px;
  background:linear-gradient(180deg,#101d31,#0b1628);
  border:1px solid rgba(148,163,184,.16);
}
.v71-search-title{
  color:#fff;
  font-size:16px;
  font-weight:900;
}
.v71-search-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:9px;
  margin-top:10px;
}
.v71-search-results{
  display:grid;
  gap:8px;
  max-height:270px;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  margin-top:10px;
}
.v71-result{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px;
  border-radius:16px;
  background:#071321;
  border:1px solid rgba(148,163,184,.14);
}
.v71-result-copy{
  min-width:0;
  flex:1;
}
.v71-result-title{
  color:#f8fafc;
  font-size:13px;
  font-weight:850;
}
.v71-result-meta{
  margin-top:3px;
  color:#94a3b8;
  font-size:11px;
}
.v71-result button{
  min-height:42px!important;
  padding:0 11px!important;
  font-size:12px!important;
}
.v71-status-pending{color:#cbd5e1!important}
.v71-status-current{color:#60a5fa!important}
.v71-status-delivered{color:#34d399!important}
.v71-status-skipped{color:#fbbf24!important}

/* Route row colour states */
tr.v71-row-current td,
.route-row.v71-row-current,
.stop-row.v71-row-current{
  background:#102b48!important;
}
tr.v71-row-delivered td,
.route-row.v71-row-delivered,
.stop-row.v71-row-delivered{
  background:rgba(16,185,129,.10)!important;
}
tr.v71-row-skipped td,
.route-row.v71-row-skipped,
.stop-row.v71-row-skipped{
  background:rgba(245,158,11,.10)!important;
}
tr.v71-row-pending td,
.route-row.v71-row-pending,
.stop-row.v71-row-pending{
  background:#0a1728!important;
}

@media(max-width:500px){
  .v71-continue-card{
    align-items:flex-start;
    flex-direction:column;
  }
  .v71-continue-card button{
    width:100%;
  }
  .v71-search-row{
    grid-template-columns:1fr;
  }
}


/* ===== V7.1.1 Route Persistence & Status Fix ===== */
#allStops tbody tr[data-v711-status="current"] td{
  background:#102b48!important;
}
#allStops tbody tr[data-v711-status="current"] td:nth-child(4){
  color:#60a5fa!important;
  font-weight:900!important;
}

#allStops tbody tr[data-v711-status="delivered"] td{
  background:rgba(16,185,129,.11)!important;
}
#allStops tbody tr[data-v711-status="delivered"] td:nth-child(4){
  color:#34d399!important;
  font-weight:900!important;
}

#allStops tbody tr[data-v711-status="skipped"] td{
  background:rgba(245,158,11,.12)!important;
}
#allStops tbody tr[data-v711-status="skipped"] td:nth-child(4){
  color:#fbbf24!important;
  font-weight:900!important;
}

#allStops tbody tr[data-v711-status="pending"] td{
  background:#0a1728!important;
}
#allStops tbody tr[data-v711-status="pending"] td:nth-child(4){
  color:#cbd5e1!important;
  font-weight:800!important;
}

.v711-resume-note{
  margin-top:8px;
  color:#94a3b8;
  font-size:12px;
}


/* ===== V7.2 Stability & Speed Edition ===== */

/* Contain heavy route sections to reduce repaint cost */
#allStops,
#matchReview,
.tablewrap,
.route-list-wrap,
#v70DriverMode,
#v67RoutePage,
#v67HomePage{
  contain:layout paint style;
}

/* Use GPU only where helpful */
.v6-bottom-nav,
.v66-appbar,
#v70DriverMode,
.v6-settings-sheet,
.v62-detail-sheet{
  transform:translateZ(0);
  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;
}

/* Reduce expensive animations for long lists */
#allStops tbody tr,
.tablewrap tbody tr,
.route-row,
.stop-row{
  transition:background-color .12s ease!important;
  will-change:auto!important;
}

/* Faster mobile scrolling */
.tablewrap,
.route-list-wrap,
.v71-search-results,
.v70-driver-mode{
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior:contain!important;
}

/* Avoid large paint areas while scrolling */
#allStops tbody tr,
.tablewrap tbody tr{
  content-visibility:auto;
  contain-intrinsic-size:72px;
}

/* Keep current row fully rendered */
#allStops tbody tr[data-v711-status="current"]{
  content-visibility:visible!important;
}

/* Reduce blur cost on slower iPhones */
@media(max-width:620px){
  .v66-appbar,
  .v6-bottom-nav,
  .v6-settings-sheet{
    backdrop-filter:blur(14px)!important;
    -webkit-backdrop-filter:blur(14px)!important;
  }
}

/* Respect reduced-motion and improve stability */
@media(prefers-reduced-motion:reduce){
  *,
  *::before,
  *::after{
    animation-duration:.001ms!important;
    animation-iteration-count:1!important;
    transition-duration:.001ms!important;
    scroll-behavior:auto!important;
  }
}


/* ===== V7.2.1 Reopen Button UI Hotfix ===== */

/* Direct ID/class coverage for known reopen/resume controls */
#reopen,
#reopenButton,
#reopenRoute,
#resumeRoute,
#v71ContinueRoute,
#v70OpenDriverMode,
button[class*="reopen" i],
button[id*="reopen" i],
button[class*="resume" i],
button[id*="resume" i]{
  min-height:52px!important;
  padding:0 18px!important;
  border-radius:16px!important;
  color:#ffffff!important;
  font-size:15px!important;
  font-weight:900!important;
  line-height:1.2!important;
  letter-spacing:-.15px!important;
  background:
    linear-gradient(135deg,#4f46e5 0%,#2563eb 58%,#0ea5e9 100%)!important;
  border:1px solid rgba(96,165,250,.44)!important;
  box-shadow:
    0 14px 30px rgba(37,99,235,.30),
    inset 0 1px 0 rgba(255,255,255,.28)!important;
  text-shadow:0 1px 1px rgba(0,0,0,.24)!important;
  opacity:1!important;
}

/* Disabled state remains readable */
#reopen:disabled,
#reopenButton:disabled,
#reopenRoute:disabled,
#resumeRoute:disabled,
button[class*="reopen" i]:disabled,
button[id*="reopen" i]:disabled,
button[class*="resume" i]:disabled,
button[id*="resume" i]:disabled{
  color:#dbeafe!important;
  background:#17243a!important;
  border-color:rgba(148,163,184,.24)!important;
  box-shadow:none!important;
  opacity:.78!important;
}

/* Shared style for compact recovery buttons */
.v721-readable-action{
  min-height:50px!important;
  padding:0 16px!important;
  border-radius:15px!important;
  color:#fff!important;
  font-size:14px!important;
  font-weight:900!important;
  background:linear-gradient(135deg,#4338ca,#2563eb 60%,#0284c7)!important;
  border:1px solid rgba(96,165,250,.38)!important;
  box-shadow:0 12px 26px rgba(37,99,235,.24)!important;
}


/* ===== V7.3 Professional Refactor Edition ===== */
.v73-diagnostics-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:16px;
}
.v73-diagnostic{
  padding:15px;
  border-radius:18px;
  background:linear-gradient(180deg,#101d31,#0b1628);
  border:1px solid rgba(148,163,184,.16);
}
.v73-diagnostic span{
  display:block;
  color:#94a3b8;
  font-size:11px;
}
.v73-diagnostic strong{
  display:block;
  margin-top:6px;
  color:#fff;
  font-size:17px;
  overflow-wrap:anywhere;
}
.v73-actions{
  display:grid;
  gap:10px;
  margin-top:16px;
}
.v73-file-label{
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:16px;
  font-weight:900;
  cursor:pointer;
}
.v73-session-badge{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:7px 10px;
  border-radius:999px;
  color:#bfdbfe;
  background:rgba(37,99,235,.12);
  border:1px solid rgba(59,130,246,.20);
  font-size:11px;
  font-weight:850;
}
@media(max-width:520px){
  .v73-diagnostics-grid{grid-template-columns:1fr}
}


/* ===== V7.3.2 Map Status Colours ===== */
.v732-map-legend{
  position:absolute;
  left:12px;
  bottom:12px;
  z-index:650;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  padding:8px 10px;
  border-radius:14px;
  background:rgba(3,7,18,.84);
  border:1px solid rgba(148,163,184,.16);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  box-shadow:0 10px 28px rgba(0,0,0,.28);
}
.v732-map-legend span{
  display:flex;
  align-items:center;
  gap:5px;
  color:#E2E8F0;
  font-size:10px;
  font-weight:800;
}
.v732-dot{
  width:9px;
  height:9px;
  display:inline-block;
  border-radius:50%;
}
.v732-dot.current{background:#2563EB;box-shadow:0 0 8px rgba(37,99,235,.8)}
.v732-dot.pending{background:#22C55E;box-shadow:0 0 8px rgba(34,197,94,.7)}
.v732-dot.skipped{background:#F59E0B;box-shadow:0 0 8px rgba(245,158,11,.7)}


/* ===== V7.3.3 Unified Branding ===== */
.v66-logo{
  width:58px!important;
  height:58px!important;
  border-radius:18px!important;
  background:
    url('./icons/icon-192.png') center/cover no-repeat!important;
  box-shadow:
    0 12px 26px rgba(37,99,235,.32),
    inset 0 1px 0 rgba(255,255,255,.18)!important;
  overflow:hidden!important;
}
.v66-logo::before,
.v66-logo::after{
  content:none!important;
  display:none!important;
}


/* ===== V7.3.4 Stability & Upload Feedback ===== */
.v734-upload-status{
  display:flex;
  align-items:center;
  gap:12px;
  margin-top:12px;
  padding:13px 14px;
  border-radius:18px;
  background:linear-gradient(180deg,#101d31,#0b1628);
  border:1px solid rgba(148,163,184,.16);
}
.v734-upload-icon{
  width:42px;
  height:42px;
  flex:0 0 42px;
  display:grid;
  place-items:center;
  border-radius:14px;
  color:#bfdbfe;
  font-size:20px;
  font-weight:900;
  background:rgba(37,99,235,.14);
  border:1px solid rgba(59,130,246,.22);
}
.v734-upload-copy{
  min-width:0;
  flex:1;
}
.v734-upload-copy b{
  display:block;
  color:#fff!important;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.v734-upload-copy span{
  display:block;
  margin-top:3px;
  color:#94a3b8;
  font-size:12px;
}
.v734-upload-status[data-state="reading"]{
  border-color:rgba(59,130,246,.42);
}
.v734-upload-status[data-state="success"]{
  border-color:rgba(52,211,153,.34);
  background:linear-gradient(180deg,rgba(10,55,51,.78),rgba(7,31,34,.86));
}
.v734-upload-status[data-state="success"] .v734-upload-icon{
  color:#a7f3d0;
  background:rgba(16,185,129,.14);
  border-color:rgba(52,211,153,.24);
}
.v734-upload-status[data-state="error"]{
  border-color:rgba(248,113,113,.36);
}
.v734-upload-status[data-state="error"] .v734-upload-icon{
  color:#fecaca;
  background:rgba(239,68,68,.14);
  border-color:rgba(248,113,113,.24);
}

.v734-page-head{
  padding:20px 4px 10px;
}
.v734-page-head h2{
  margin:5px 0 0;
  color:#fff;
  font-size:30px;
  letter-spacing:-1px;
}
.v734-page-head p{
  margin:7px 0 0;
  color:#94a3b8!important;
}
.v734-metric-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:11px;
  margin-top:12px;
}
.v734-metric{
  min-height:112px;
  padding:15px 10px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
  border-radius:22px;
  background:linear-gradient(180deg,#101d31,#0b1628);
  border:1px solid rgba(148,163,184,.16);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
}
.v734-metric span{
  color:#94a3b8;
  font-size:12px;
}
.v734-metric strong{
  display:block;
  margin-top:7px;
  color:#fff!important;
  font-size:27px;
}
.v734-progress-card,
.v734-history-card{
  margin-top:14px;
  padding:19px!important;
}
.v734-progress-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  color:#fff;
}
.v734-progress-track{
  height:10px;
  margin:13px 0 10px;
  overflow:hidden;
  border-radius:999px;
  background:#17243a;
}
.v734-progress-track > div{
  width:0%;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#2563eb,#22d3ee);
  transition:width .25s ease;
}
#v734HistoryMount{
  margin-top:10px;
  line-height:1.6;
}
@media(max-width:620px){
  .v734-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}


/* ===== V7.3.5 Upload Status Position Fix ===== */
#v734UploadStatus{
  margin-top:14px!important;
  margin-bottom:16px!important;
}


/* ===== V7.4 Swipe Actions Edition ===== */
#allStops tbody tr{
  position:relative;
  transition:transform .16s ease,background-color .16s ease!important;
  touch-action:pan-y!important;
  user-select:none;
  -webkit-user-select:none;
}

#allStops tbody tr.v74-swiping{
  z-index:4;
}

#allStops tbody tr.v74-swipe-delivered td{
  background:rgba(16,185,129,.22)!important;
}

#allStops tbody tr.v74-swipe-skipped td{
  background:rgba(245,158,11,.22)!important;
}

#allStops tbody tr::before,
#allStops tbody tr::after{
  position:absolute;
  top:0;
  bottom:0;
  display:flex;
  align-items:center;
  font-size:13px;
  font-weight:900;
  opacity:0;
  pointer-events:none;
  transition:opacity .12s ease;
  z-index:5;
}

#allStops tbody tr::before{
  content:"Skip";
  left:12px;
  color:#fbbf24;
}

#allStops tbody tr::after{
  content:"Delivered";
  right:12px;
  color:#34d399;
}

#allStops tbody tr.v74-swipe-right::before,
#allStops tbody tr.v74-swipe-left::after{
  opacity:1;
}

.v74-swipe-hint{
  margin-top:10px;
  padding:10px 12px;
  border-radius:15px;
  color:#94a3b8;
  background:rgba(15,23,42,.68);
  border:1px solid rgba(148,163,184,.12);
  font-size:12px;
  text-align:center;
}

@media(prefers-reduced-motion:reduce){
  #allStops tbody tr{
    transition:none!important;
  }
}


/* ===== V8.0 AI Vision ===== */
.v80-review-sheet{
  position:fixed;
  inset:0;
  z-index:2147483400;
  display:none;
  overflow-y:auto;
  padding:max(20px,env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
  background:rgba(2,6,17,.86);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
.v80-review-sheet.show{display:block}
.v80-review-panel{
  width:min(720px,100%);
  margin:0 auto;
  padding:20px;
  border-radius:28px;
  background:linear-gradient(180deg,#101d31,#071321);
  border:1px solid rgba(148,163,184,.18);
  box-shadow:0 30px 80px rgba(0,0,0,.42);
}
.v80-review-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
}
.v80-review-head h2{
  margin:5px 0 0;
  color:#fff;
  font-size:27px;
}
.v80-review-head p{
  margin:6px 0 0;
  color:#94a3b8;
}
.v80-review-notice{
  margin-top:14px;
  padding:12px 14px;
  border-radius:16px;
  color:#bfdbfe;
  background:rgba(37,99,235,.11);
  border:1px solid rgba(59,130,246,.20);
  font-size:13px;
  line-height:1.5;
}
#v80ReviewAddresses{
  width:100%;
  min-height:360px!important;
  margin-top:14px;
  font-size:15px!important;
  line-height:1.55!important;
}
.v80-review-stats{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:9px;
  margin-top:12px;
}
.v80-review-stats>div{
  padding:13px 8px;
  text-align:center;
  border-radius:16px;
  background:#0b1728;
  border:1px solid rgba(148,163,184,.14);
}
.v80-review-stats span{
  display:block;
  color:#94a3b8;
  font-size:11px;
}
.v80-review-stats strong{
  display:block;
  margin-top:5px;
  color:#fff;
  font-size:22px;
}
.v80-review-actions{
  display:grid;
  grid-template-columns:1fr 1.5fr;
  gap:10px;
  margin-top:14px;
}
@media(max-width:520px){
  .v80-review-stats{grid-template-columns:1fr}
  .v80-review-actions{grid-template-columns:1fr}
}


/* ===== V8.1 Smart Scan Edition ===== */
.v81-import-photo{
  background:linear-gradient(180deg,#101d31,#0b1628)!important;
  border:1px solid rgba(148,163,184,.18)!important;
}
.v81-scan-sheet{
  position:fixed;
  inset:0;
  z-index:2147483450;
  display:none;
  overflow-y:auto;
  padding:max(18px,env(safe-area-inset-top)) 14px calc(24px + env(safe-area-inset-bottom));
  background:rgba(2,6,17,.88);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
.v81-scan-sheet.show{display:block}
.v81-scan-panel{
  width:min(760px,100%);
  margin:0 auto;
  padding:20px;
  border-radius:28px;
  background:linear-gradient(180deg,#101d31,#071321);
  border:1px solid rgba(148,163,184,.18);
  box-shadow:0 30px 80px rgba(0,0,0,.44);
}
.v81-scan-head{
  display:flex;
  justify-content:space-between;
  gap:14px;
  align-items:flex-start;
}
.v81-scan-head h2{
  margin:5px 0 0;
  color:#fff;
  font-size:27px;
}
.v81-scan-head p{
  margin:6px 0 0;
  color:#94a3b8;
}
.v81-preview-wrap{
  position:relative;
  margin-top:14px;
  overflow:hidden;
  border-radius:22px;
  background:#020611;
  border:1px solid rgba(148,163,184,.16);
}
#v81ScanPreview{
  display:block;
  width:100%;
  max-height:62vh;
  object-fit:contain;
  background:#fff;
}
.v81-scan-badge{
  position:absolute;
  top:12px;
  left:12px;
  padding:8px 11px;
  border-radius:999px;
  color:#fff;
  background:rgba(2,6,17,.82);
  border:1px solid rgba(148,163,184,.18);
  font-size:11px;
  font-weight:900;
}
.v81-quality-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:9px;
  margin-top:12px;
}
.v81-quality-grid>div{
  padding:13px 8px;
  text-align:center;
  border-radius:16px;
  background:#0b1728;
  border:1px solid rgba(148,163,184,.14);
}
.v81-quality-grid span{
  display:block;
  color:#94a3b8;
  font-size:11px;
}
.v81-quality-grid strong{
  display:block;
  margin-top:5px;
  color:#fff;
  font-size:18px;
}
.v81-scan-tip{
  margin-top:12px;
  padding:12px 14px;
  border-radius:16px;
  color:#bfdbfe;
  background:rgba(37,99,235,.10);
  border:1px solid rgba(59,130,246,.18);
  font-size:13px;
  line-height:1.5;
}
.v81-scan-actions{
  display:grid;
  grid-template-columns:1fr 1.5fr;
  gap:10px;
  margin-top:14px;
}
@media(max-width:520px){
  .v81-quality-grid{grid-template-columns:1fr}
  .v81-scan-actions{grid-template-columns:1fr}
}


/* ===== V8.1.1 Input Routing Fix ===== */
#v65TakePhoto,
#v81ImportPhoto,
#v69PastePostcodes{
  cursor:pointer!important;
}
#v65TakePhoto{
  background:linear-gradient(135deg,#2563eb,#0ea5e9)!important;
}
#v81ImportPhoto{
  background:linear-gradient(180deg,#101d31,#0b1628)!important;
}
#v69PastePostcodes{
  background:linear-gradient(135deg,#6d28d9,#4f46e5)!important;
}


/* ===== V8.1.3 Fast Scan Preparation ===== */
#v734UploadStatus[data-state="reading"] .v734-upload-icon{
  animation:v813spin 1s linear infinite;
}
@keyframes v813spin{
  from{transform:rotate(0deg)}
  to{transform:rotate(360deg)}
}


/* ===== V8.1.4 Instant Upload Preview ===== */
#v81UseScan:disabled,
#v81Retake:disabled{
  opacity:.58!important;
  pointer-events:none!important;
}
#v81ScanBadge{
  min-width:68px;
  text-align:center;
}


/* ===== V8.1.5 Instant Preview Decoder Fix ===== */
#v81ScanPreview{
  min-height:240px;
}
#v734UploadStatus[data-state="success"] .v734-upload-icon{
  animation:none!important;
  transform:none!important;
}


/* ===== V8.2 AI Vision Address Extractor ===== */
.v82-ai-info{
  margin-top:14px;
  padding:13px 14px;
  border-radius:17px;
  color:#bfdbfe;
  background:rgba(37,99,235,.10);
  border:1px solid rgba(59,130,246,.20);
  font-size:13px;
  line-height:1.55;
}
.v82-label{
  display:block;
  margin:16px 0 7px;
  color:#f8fafc;
  font-size:13px;
  font-weight:850;
}
.v82-token-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:9px;
}
.v82-ai-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:16px;
}
.v82-ai-progress{
  margin-top:14px;
  padding:14px;
  border-radius:18px;
  background:#0b1728;
  border:1px solid rgba(59,130,246,.22);
}
.v82-progress-top{
  display:flex;
  justify-content:space-between;
  gap:12px;
  color:#fff;
}
.v82-progress-track{
  height:9px;
  margin:11px 0 9px;
  overflow:hidden;
  border-radius:999px;
  background:#17243a;
}
.v82-progress-track>div{
  width:0%;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#4f46e5,#2563eb,#06b6d4);
  transition:width .25s ease;
}
.v82-ai-result-badge{
  display:inline-flex;
  padding:7px 10px;
  border-radius:999px;
  color:#a7f3d0;
  background:rgba(16,185,129,.12);
  border:1px solid rgba(52,211,153,.22);
  font-size:11px;
  font-weight:900;
}
@media(max-width:520px){
  .v82-ai-actions,.v82-token-row{grid-template-columns:1fr}
}


/* ===== V8.2.1 Stable AI Vision Edition ===== */
.v821-ai-required{
  margin-top:10px;
  padding:11px 13px;
  border-radius:15px;
  color:#bfdbfe;
  background:rgba(37,99,235,.10);
  border:1px solid rgba(59,130,246,.18);
  font-size:12px;
  line-height:1.5;
}
.v821-ai-required strong{color:#fff}
#v81UseScan{
  min-height:58px!important;
  font-weight:950!important;
}


/* ===== V8.5 Double-Scan OCR Loader ===== */
.v84-scanner-card{
  background:linear-gradient(135deg,#0f766e,#2563eb)!important;
  border:1px solid rgba(94,234,212,.34)!important;
}
.v85-mode-tabs{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:14px;
  padding:5px;
  border-radius:18px;
  background:#071321;
  border:1px solid rgba(148,163,184,.14);
}
.v85-mode-tabs button{
  min-height:48px!important;
  border-radius:14px!important;
  color:#94a3b8!important;
  background:transparent!important;
  box-shadow:none!important;
}
.v85-mode-tabs button.active{
  color:#fff!important;
  background:linear-gradient(135deg,#0f766e,#2563eb)!important;
  box-shadow:0 10px 24px rgba(37,99,235,.20)!important;
}
.v85-video-wrap{
  position:relative;
  margin-top:14px;
  overflow:hidden;
  border-radius:22px;
  background:#020611;
  border:1px solid rgba(148,163,184,.16);
}
#v85Video{
  display:block;
  width:100%;
  max-height:55vh;
  object-fit:cover;
  background:#020611;
}
.v85-focus-box{
  position:absolute;
  left:8%;
  right:8%;
  top:24%;
  height:42%;
  border:3px solid rgba(94,234,212,.92);
  border-radius:20px;
  box-shadow:0 0 0 9999px rgba(2,6,17,.28),0 0 22px rgba(45,212,191,.42);
  pointer-events:none;
}
.v85-focus-label{
  position:absolute;
  left:50%;
  bottom:12px;
  transform:translateX(-50%);
  padding:7px 10px;
  border-radius:999px;
  color:#fff;
  background:rgba(2,6,17,.82);
  font-size:11px;
  font-weight:900;
  white-space:nowrap;
}
.v85-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:12px;
}
.v85-status{
  margin-top:12px;
  padding:12px 14px;
  border-radius:16px;
  color:#bfdbfe;
  background:rgba(37,99,235,.10);
  border:1px solid rgba(59,130,246,.18);
  font-size:13px;
  line-height:1.5;
}
.v85-result{
  display:none;
  margin-top:14px;
  padding:22px 16px;
  text-align:center;
  border-radius:24px;
  background:
    radial-gradient(circle at 50% 0%,rgba(37,99,235,.22),transparent 38%),
    linear-gradient(180deg,#101d31,#071321);
  border:1px solid rgba(96,165,250,.28);
}
.v85-result.show{display:block}
.v85-stop-label{
  color:#94a3b8;
  font-size:12px;
  font-weight:900;
  letter-spacing:1.8px;
}
.v85-stop-number{
  margin-top:4px;
  color:#fff;
  font-size:74px;
  font-weight:1000;
  line-height:1;
  letter-spacing:-4px;
  text-shadow:0 0 28px rgba(59,130,246,.58);
}
.v85-stop-address{
  margin-top:10px;
  color:#dbeafe;
  font-size:15px;
  line-height:1.5;
}
.v85-list{
  margin-top:14px;
  max-height:210px;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
}
.v85-item{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:11px 12px;
  border-bottom:1px solid rgba(148,163,184,.10);
}
.v85-item b{color:#fff}
.v85-item span{color:#94a3b8;font-size:12px}
.v85-privacy{
  margin-top:12px;
  padding:11px 13px;
  border-radius:15px;
  color:#a7f3d0;
  background:rgba(16,185,129,.10);
  border:1px solid rgba(52,211,153,.20);
  font-size:12px;
  line-height:1.5;
}
@media(max-width:520px){
  .v85-actions,.v85-mode-tabs{grid-template-columns:1fr}
  .v85-stop-number{font-size:64px}
}

#v85Result.show{display:block!important;visibility:visible!important;opacity:1!important}#v851RepeatStop{color:#fff!important;background:linear-gradient(135deg,#4338ca,#2563eb)!important;font-weight:900!important}
/* ===== V8.7.1 Fuzzy OCR Performance Upgrade ===== */
.v85-actions{grid-template-columns:repeat(3,1fr)!important}
#v85Result.show{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
}
#v852AutoScanToggle{
  color:#fff!important;
  background:linear-gradient(135deg,#0f766e,#2563eb)!important;
  font-weight:900!important;
}
@media(max-width:600px){
  .v85-actions{grid-template-columns:1fr!important}
}
