/* ===== Root variables - نفس مقاسات الكود الثاني ===== */
:root{
  --bg:#f6f6f6;
  --card:#ffffff;
  --card2:#f0f0f0;
  --text:#111;
  --muted:rgba(0,0,0,.60);
  --border:rgba(0,0,0,.10);
  --shadow:0 12px 26px rgba(0,0,0,.10);
  --radius:12px;
  --accent:#F85203;
  --accent2:#FF6A1F;
  --danger:#ff5b5b;
  --control-h:36px;
  --nav-h:48px;
  --header-h:40px;
  --font-base:12px;
  --font-title:14px;
  --sheet-max-h:70vh;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
  overflow-x:hidden;
  font-size:var(--font-base);
}

a{color:inherit;text-decoration:none}
button,input,select{font-family:inherit}
.hidden{display:none !important}

/* ===== Map behind ===== */
#map{
  position:fixed;
  inset:0;
  z-index:1;
  transition:opacity .2s ease;
  pointer-events:auto;
  touch-action:pan-x pan-y;
}
body:not(.home-visible) #map{
  opacity:0;
  pointer-events:none;
}

/* ===== Top bar ===== */
.top{
  position:fixed;
  left:0;
  right:0;
  top:0;
  z-index:160;
  background:transparent;
  border-bottom:0;
  height:calc(var(--header-h) + env(safe-area-inset-top));
  pointer-events:none;
}
.top-inner{
  max-width:820px;
  margin:0 auto;
  padding:calc(env(safe-area-inset-top) + 6px) 12px 6px;
  display:flex;
  align-items:center;
  gap:10px;
  height:100%;
  pointer-events:none;
}
.logo{
  height:0px;
  width:auto;
  display:block;
  object-fit:contain;
  filter:drop-shadow(0 4px 10px rgba(0,0,0,.18));
  pointer-events:auto;
}
.pill{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:10px;
  pointer-events:auto;
}
.icon-btn{
  width:34px;
  height:34px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.30);
  background:rgba(255,255,255,.72);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow:0 10px 24px rgba(0,0,0,.12);
  cursor:pointer;
  display:grid;
  place-items:center;
  font-size:14px;
  pointer-events:auto;
}
.icon-btn:active{transform:translateY(1px)}
body.dark .icon-btn{
  background:rgba(20,20,20,.62);
  color:#fff;
  border-color:rgba(255,255,255,.14);
}

/* ===== Pages container ===== */
.pages{
  position:relative;
  z-index:2;
  padding-top:var(--header-h);
padding-bottom:calc(var(--nav-h) + 24px + env(safe-area-inset-bottom));
  min-height:100vh;
}

/* مهم جداً: في صفحة الهوم لا تخلي pages تمنع لمس الخريطة */
body.home-visible .pages{
  pointer-events:none;
}
body.home-visible .pages .pageHome{
  pointer-events:none;
}

/* في الصفحات الثانية ترجع طبيعي */
body:not(.home-visible) .pages{
  pointer-events:auto;
}
.page{display:block}
.page.hidden{display:none}

/* ===== Cards etc ===== */
.wrap{max-width:820px;margin:0 auto;padding:0 14px;}
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
}
.card.pad{padding:8px;}
.section-title{font-weight:900;font-size:var(--font-title);margin:6px 0 10px;}
.subtle{color:var(--muted);font-size:10px}

.profile{
  text-align:center;
  padding:16px 14px 10px;
  background:linear-gradient(180deg, rgba(248,82,3,.10), rgba(255,255,255,0));
}
.avatar{
  width:48px;height:48px;
  border-radius:999px;
  background:rgba(0,0,0,.06);
  margin:4px auto 10px;
  display:grid;place-items:center;
}
.avatar svg{
  opacity:.75;
  width:22px;height:22px;
}
.name{font-weight:900;font-size:14px;margin:0;}
.email{margin:4px 0 0;color:var(--muted);font-size:10px}

.list{display:flex;flex-direction:column}
.row{
  display:flex;align-items:center;gap:12px;
  padding:8px;
  border-top:1px solid rgba(0,0,0,.06);
  background:#fff;
  cursor:pointer;
}
body.dark .row{background:var(--card);}
.row:first-child{border-top:0}
.row .left{
  width:28px;height:28px;
  border-radius:var(--radius);
  border:1px solid rgba(248,82,3,.22);
  background:rgba(248,82,3,.10);
  display:grid;place-items:center;
  flex:0 0 28px;
}
.row .left svg{
  width:14px;height:14px;
}
.row .mid{flex:1;min-width:0}
.row .t{font-weight:900;font-size:12px;}
.row .d{font-size:10px;color:var(--muted);margin-top:2px}
.row .chev{opacity:.55}
.row .chev svg{width:14px;height:14px;}

.seg{
  display:flex; gap:10px;
  background:rgba(0,0,0,.05);
  border:1px solid rgba(0,0,0,.06);
  border-radius:999px;
  padding:8px;
}
.seg button{
  flex:1;
  height:36px;
  border-radius:999px;
  border:0;
  cursor:pointer;
  font-weight:900;
  background:transparent;
  color:rgba(0,0,0,.55);
  font-size:12px;
}
.seg button.active{
  background:#fff;
  color:#111;
  box-shadow:0 10px 16px rgba(0,0,0,.10);
}

.empty{
  padding:22px 14px;
  text-align:center;
}
.empty .ic{
  width:54px;height:54px;border-radius:var(--radius);
  border:1px solid var(--border);
  display:grid;place-items:center;
  margin:0 auto 10px;
  background:rgba(0,0,0,.03);
}
.primary{
  width:100%;
  height:var(--control-h);
  border-radius:10px;
  border:0;
  background:linear-gradient(180deg, var(--accent2), var(--accent));
  color:#fff;
  text-shadow:0 1px 2px rgba(0,0,0,.25);
  font-weight:950;
  cursor:pointer;
  box-shadow:0 12px 28px rgba(0,0,0,.18);
  font-size:12px;
  padding:0 12px;
}
.btn-ghost{
  width:100%;
  height:var(--control-h);
  border-radius:10px;
  border:1px solid var(--border);
  background:transparent;
  font-weight:950;
  cursor:pointer;
  font-size:12px;
  padding:0 12px;
}
.btn-close{
  width:100%;
  height:var(--control-h);
  border-radius:10px;
  border:0;
  background:#007bff;
  color:white;
  font-weight:950;
  cursor:pointer;
  box-shadow:0 12px 28px rgba(0,0,0,.18);
  font-size:12px;
  padding:0 12px;
}

/* ===== Bottom Nav ===== */
.bottom{
  position:fixed; left:0; right:0; bottom:0;
  display:flex; justify-content:center;
  padding-bottom:calc(10px + env(safe-area-inset-bottom));
  z-index:200;
  background:transparent;
  pointer-events:none;
}
.bottom-inner{
  pointer-events:auto;
  width:max-content;
  max-width:94%;
  height:60px;
  display:flex;align-items:center;justify-content:space-around;
  gap:6px;
  padding:6px 14px;
  border-radius:999px;
  background:rgba(255,255,255,.92);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border:1px solid rgba(0,0,0,.06);
  box-shadow:0 14px 36px rgba(0,0,0,.16);
}
body.dark .bottom-inner{
  background:rgba(20,20,20,.90);
  border-color:rgba(255,255,255,.08);
}
.tab{
  width:78px;
  display:flex;flex-direction:column;align-items:center;gap:2px;
  border:0;background:transparent;cursor:pointer;
  color:rgba(0,0,0,.45);
  font-weight:900;
  padding:6px 4px;
  border-radius:999px;
  font-size:10px;
  transition:background .15s, color .15s;
}
body.dark .tab{ color:rgba(255,255,255,.45); }
.tab svg{
  width:18px;height:18px;
  opacity:.6;
}
.tab.active{
  color:var(--accent);
  background:rgba(248,82,3,.12);
}
.tab.active svg{opacity:1}

/* ===== Overlay dim ===== */
.overlay{
  position:fixed; inset:0;
  background:rgba(0,0,0,.30);
  z-index:120;
  display:none;
}
.overlay.show{display:block}

/* ===== SHEETS behavior ===== */
.sheet{
  position:fixed; left:0; right:0; bottom:0px;
  z-index:121;
  padding:0 0 calc(14px + env(safe-area-inset-bottom));
  display:none;
  pointer-events:none;
  transform:translateY(110%);
  transition:transform .22s ease;
  will-change:transform;
}
.sheet.open{
  display:block;
  pointer-events:auto;
  transform:translateY(0);
}
.sheet.dragging{transition:none}

#homeSheet{ z-index:121; }

.sheet-card{
  max-width:820px;
  margin:0 auto;
  border-radius:24px;
  border:1px solid rgba(255,255,255,.10);
  background:linear-gradient(180deg, rgba(15,29,22,.92), rgba(11,21,16,.92));
  box-shadow:0 18px 60px rgba(0,0,0,.55);
  overflow:hidden;
  max-height:calc(100vh - 14px);
  display:flex;flex-direction:column;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
body:not(.dark) .sheet-card{
  background:linear-gradient(180deg, rgba(255,255,255,.96), rgba(245,245,245,.96));
  border-color:rgba(0,0,0,.08);
}
.sheet-grip{
  width:54px;height:5px;border-radius:999px;
  background:rgba(255,255,255,.22);
  margin:10px auto 0;
  touch-action:none;
}
body:not(.dark) .sheet-grip{
  background:rgba(0,0,0,.18);
}
.sheet-head{
  padding:12px 14px 10px;
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  border-bottom:1px solid rgba(255,255,255,.08);
  touch-action:none;
}
.sheet-title{font-weight:900;font-size:16px;letter-spacing:.2px;}
.sheet-sub{font-size:13px;color:var(--muted);margin-top:8px}
.sheet-x{
  width:28px;height:28px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.20);
  color:var(--text);
  cursor:pointer;
  display:grid;place-items:center;
  font-size:14px;
}
body:not(.dark) .sheet-x{
  border-color:rgba(0,0,0,.10);
  background:rgba(0,0,0,.06);
}

.sheet-body{
  flex:1;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
  padding:14px;
  touch-action: pan-y;
}

.sheet-footer{
  padding:12px 14px calc(100px + env(safe-area-inset-bottom));
  border-top:1px solid rgba(255,255,255,.08);
  background:rgba(7,17,12,.55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
body:not(.dark) .sheet-footer{ background:rgba(255,255,255,.75); }

/* === أزرار التنقل المزدوجة === */
.footer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.back-action, .main-action {
  height: var(--control-h);
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.1);
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
  padding: 0 16px;
  font-size: 12px;
  flex: 1;
  max-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-action {
  background: linear-gradient(180deg, var(--accent2), var(--accent));
  color: #fff;
  text-shadow:0 1px 2px rgba(0,0,0,.25);
  border: none;
  box-shadow: 0 12px 28px rgba(0,0,0,.3);
  max-width: 200px;
}

.main-action:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.sheet-actions{
  padding:12px 14px calc(12px + env(safe-area-inset-bottom));
  border-top:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.75);
}
body.dark .sheet-actions{
  background:rgba(7,17,12,.55);
  border-top-color:rgba(255,255,255,.08);
}

/* radio rows */
.radio-row{
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;
  padding:8px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,.08);
  background:rgba(0,0,0,.03);
  cursor:pointer;
  margin-bottom:10px;
}
body.dark .radio-row{
  border-color:rgba(255,255,255,.10);
  background:rgba(255,255,255,.05);
}
.radio-row .l{font-size:12px;}
.radio-row .dot{
  width:18px;height:18px;border-radius:999px;
  border:2px solid rgba(0,0,0,.25);
  position:relative;
  display:grid;place-items:center;
  flex:0 0 18px;
}
body.dark .radio-row .dot{ border-color:rgba(255,255,255,.30); }
.radio-row .dot i{
  width:8px;height:8px;border-radius:999px;
  background:transparent;
  display:block;
}
.radio-row.active{
  border-color:rgba(248,82,3,.35);
  box-shadow:0 12px 26px rgba(0,0,0,.08);
}
.radio-row.active .dot{ border-color:rgba(248,82,3,.85); }
.radio-row.active .dot i{ background:rgba(248,82,3,.85); }

/* ===== Home sheet controls ===== */
.block{
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
  border-radius:10px;
  padding:6px;
}
body:not(.dark) .block{
  background:rgba(0,0,0,.04);
  border-color:rgba(0,0,0,.08);
}

.route-title{
  text-align:center;
  font-size:14px;
  font-weight:950;
  margin:0 0 10px;
}
.route-box{
  position:relative;
  border-radius:22px;
  border:1px solid rgba(248,82,3,.28);
  background:rgba(0,0,0,.16);
  padding:6px;
  display:grid;
  gap:10px;
}
.rrow{display:flex;align-items:center;gap:10px}
.dot{
  width:5px;height:5px;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.12);
  flex:0 0 5px;
}
.dot.from{background:#4e77ff}
.dot.to{background:var(--accent2)}
.dot.stop{background:#ffb020}

.field{
  display:flex;align-items:center;gap:10px;
  height:var(--control-h);
  border-radius:10px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(8,18,12,.55);
  padding:0 6px;
  min-width:0;
  position:relative;
}
body:not(.dark) .field{
  background:rgba(255,255,255,.8);
  border-color:rgba(0,0,0,.12);
}
.field input{
  border:0;outline:0;background:transparent;
  color:var(--text);
  width:100%;
  font-size:16px;
  min-width:0;
}

.glass{
  width:18px;height:18px;border:2px solid currentColor;
  border-radius:50%;
  position:relative;
  flex:0 0 18px;
  opacity:.85;
}
.glass::after{
  content:"";
  position:absolute;
  width:9px;height:2px;
  background:currentColor;
  right:-7px;bottom:-3px;
  transform:rotate(45deg);
  border-radius:2px;
}

.icon{
  width:30px;height:30px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.22);
  color:var(--text);
  cursor:pointer;
  display:grid;place-items:center;
  flex:0 0 30px;
  font-size:14px;
}
.icon:active{transform:translateY(1px)}
body:not(.dark) .icon{
  background:rgba(255,255,255,.8);
  border-color:rgba(0,0,0,.12);
}

.swap{
  position:absolute;
  right:10px; top:50%;
  transform:translateY(-50%);
  width:30px;height:30px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.22);
  cursor:pointer;
  display:grid;place-items:center;
}

.suggest{
  position:absolute;
  left:0; right:0;
  top:calc(36px + 8px);
  border-radius:10px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(8,18,12,.92);
  box-shadow:0 18px 50px rgba(0,0,0,.55);
  overflow:hidden;
  z-index:50;
  max-height:260px;
  overflow-y:auto;
}
body:not(.dark) .suggest{
  background:white;
  border-color:rgba(0,0,0,.1);
}
.s-item{
  padding:8px 10px;
  border-top:1px solid rgba(255,255,255,.06);
  cursor:pointer;
}
.s-item:first-child{border-top:0}
.s-item:hover{background:rgba(255,255,255,.06)}
.s-top{
  display:flex;align-items:center;gap:8px;
  font-weight:800;
  font-size:12px;
}
.s-sub{margin-top:2px;font-size:10px;color:var(--muted)}
.badge{
  font-size:9px;
  padding:2px 5px;
  border-radius:999px;
  border:1px solid rgba(248,82,3,.28);
  color:rgba(248,82,3,.95);
  background:rgba(248,82,3,.08);
  font-weight:900;
}

.stops{display:grid;gap:10px}
.stop-row{display:flex;align-items:center;gap:10px}
.remove{
  width:30px;height:30px;
  border-radius:8px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.22);
  color:var(--text);
  cursor:pointer;
  flex:0 0 30px;
  display:grid;place-items:center;
  font-size:14px;
}
.addstop{
  height:36px;
  border-radius:8px;
  border:1px dashed rgba(255,255,255,.22);
  background:rgba(255,255,255,.06);
  color:var(--text);
  font-weight:900;
  cursor:pointer;
  font-size:12px;
}

.flowbar{
  display:flex;align-items:center;justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}
.stepchips{display:flex;gap:3px;align-items:center}
.chipstep{
  font-size:9px;
  padding:2px 5px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  color:rgba(255,255,255,.70);
  background:rgba(255,255,255,.04);
  font-weight:900;
}
body:not(.dark) .chipstep{ color:rgba(0,0,0,.55); }
.chipstep.active{
  border-color:rgba(248,82,3,.30);
  color:rgba(248,82,3,.95);
  background:rgba(248,82,3,.10);
}

.grid2{display:grid;gap:10px}
@media(min-width:760px){ .grid2{grid-template-columns:1fr 1fr} }

.lbl{font-size:10px;color:var(--muted);font-weight:900;margin:0 0 6px}
.ctrl{
  height:var(--control-h);
  border-radius:10px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(8,18,12,.55);
  color:var(--text);
  padding:0 6px;
  width:100%;
  outline:none;
  font-size:12px;
}
body:not(.dark) .ctrl{
  background:white;
  border-color:rgba(0,0,0,.12);
}

.toggle{
  display:flex; gap:10px;
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.08);
  border-radius:999px;
  padding:6px;
}
.toggle button{
  flex:1;
  height:36px;
  border-radius:999px;
  border:0;
  cursor:pointer;
  font-weight:950;
  color:rgba(255,255,255,.65);
  background:transparent;
  font-size:12px;
}
body:not(.dark) .toggle button{ color:rgba(0,0,0,.55); }
.toggle button.active{
  background:rgba(0,0,0,.25);
  color:var(--text);
  box-shadow:0 14px 30px rgba(0,0,0,.40);
  border:1px solid rgba(255,255,255,.10);
}
body:not(.dark) .toggle button.active{
  background:#fff;
  border-color:rgba(0,0,0,.08);
  box-shadow:0 10px 18px rgba(0,0,0,.10);
}

.helper{
  margin-top:10px;
  font-size:10px;
  color:var(--muted);
  text-align:center;
  white-space:pre-line;
}

/* Fullscreen picker */
#pickModal{
  position:fixed; inset:0;
  z-index:200;
  display:none;
  flex-direction:column;
  background:rgba(255,255,255,0.98);
  backdrop-filter: blur(10px) saturate(180%);
  -webkit-backdrop-filter: blur(10px) saturate(180%);
  color:#111;
}
#pickModal.open{display:flex}
.pickTop{
  padding:12px 12px calc(10px + env(safe-area-inset-top));
  display:flex;align-items:center;gap:10px;
  border-bottom:1px solid rgba(0,0,0,.08);
  height:36px;
}
.back{
  width:32px;height:32px;
  border-radius:8px;
  border:1px solid rgba(0,0,0,.12);
  background:rgba(255,255,255,.9);
  color:#111;
  cursor:pointer;
  font-size:16px;
  box-shadow:0 4px 10px rgba(0,0,0,.05);
  display:grid;place-items:center;
}
.pickSearch{
  flex:1;
  display:flex;align-items:center;gap:10px;
  border:1px solid rgba(0,0,0,.12);
  background:white;
  border-radius:8px;
  padding:0 6px;
  height:36px;
  box-shadow:0 4px 10px rgba(0,0,0,.03);
}
.pickSearch input{
  border:0;outline:0;background:transparent;
  color:#111;
  width:100%;
  font-size:12px;
}
.pickSearch input::placeholder{ color:#888; }
.pickSearch button{
  width:30px;height:30px;
  border-radius:8px;
  border:1px solid rgba(0,0,0,.08);
  background:rgba(0,0,0,.02);
  color:#111;
  cursor:pointer;
  display:grid;place-items:center;
  font-size:14px;
}
.pickMapWrap{position:relative;flex:1;min-height:0}
#pickMap{width:100%;height:100%}
.pin{
  position:absolute;left:50%;top:50%;
  width:20px;height:32px;
  transform:translate(-50%,-100%);
  z-index:500;
  pointer-events:none;
}
.pin::before{
  content:"";
  position:absolute;left:50%;top:0;transform:translateX(-50%);
  width:20px;height:20px;
  border-radius:50%;
  background:var(--accent2);
  box-shadow:0 18px 40px rgba(0,0,0,.2);
}
.pin::after{
  content:"";
  position:absolute;left:50%;top:18px;transform:translateX(-50%);
  width:4px;height:14px;
  border-radius:0 0 4px 4px;
  background:var(--accent2);
}
.pin span{
  position:absolute;left:50%;top:6px;transform:translateX(-50%);
  width:8px;height:8px;border-radius:50%;
  background:#04110a;
}
.pickBottom{
  padding:12px 12px calc(14px + env(safe-area-inset-bottom));
  border-top:1px solid rgba(0,0,0,.08);
  background:white;
}
.picked{
  font-weight:950;
  margin:6px 0 10px;
  font-size:12px;
  color:#111;
}
.confirm{
  width:100%;
  height:36px;
  border-radius:10px;
  border:0;
  background:linear-gradient(180deg, var(--accent2), var(--accent));
  color:#fff;
  text-shadow:0 1px 2px rgba(0,0,0,.25);
  font-weight:950;
  font-size:12px;
  cursor:pointer;
  box-shadow:0 18px 40px rgba(0,0,0,.2);
  padding:0 12px;
}

/* RTL tweaks */
body[dir="rtl"] .top-inner{flex-direction:row-reverse}
body[dir="rtl"] .pill{margin-left:0;margin-right:auto}
body[dir="rtl"] .row{flex-direction:row-reverse}
body[dir="rtl"] .sheet-head{flex-direction:row-reverse}
body[dir="rtl"] .rrow{flex-direction:row-reverse}
body[dir="rtl"] .footer-actions{flex-direction:row-reverse}
/* ══ VEHICLE CARDS ══ */
.vcard {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1.5px solid rgba(0,0,0,.10);
  background: rgba(255,255,255,.80);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  margin-bottom: 8px;
}
body.dark .vcard {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.10);
}
.vcard.selected {
  border-color: var(--accent);
  background: rgba(248,82,3,.07);
}
body.dark .vcard.selected {
  background: rgba(248,82,3,.15);
}
.vcard-ico {
  width: 80px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
  overflow: visible;
  background: transparent;
  margin-left: -10px;
}



.vcard-info { flex: 1; min-width: 0; }
.vcard-name { font-size: 13px; font-weight: 900; color: var(--text); }
.vcard-desc { font-size: 10px; color: var(--muted); margin-top: 2px; }
.vcard-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.vcard-price { font-size: 14px; font-weight: 900; color: #D94500; }
body.dark .vcard-price { color: var(--accent2); }
.vcard-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,.20);
  display: grid;
  place-items: center;
  transition: all .15s;
}
body.dark .vcard-check { border-color: rgba(255,255,255,.25); }
.vcard.selected .vcard-check {
  border-color: var(--accent);
  background: var(--accent);
}
.vcard.selected .vcard-check::after {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  display: block;
}

/* ══ ROUTE MAP ══ */
#routeMapWrap {
  width: 100%;
  height: 160px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid rgba(0,0,0,.08);
}
body.dark #routeMapWrap {
  border-color: rgba(255,255,255,.08);
}
/* ══ Theme Toggle Button ══ */
.theme-toggle {
  position: relative;
  width: 54px;
  height: 28px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
  flex-shrink: 0;
}
.theme-toggle input {
  opacity: 0;
  width: 0; height: 0;
  position: absolute;
}
.tt-track {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  background: linear-gradient(135deg, #e0e0e8, #d0d0d8);
  box-shadow:
    inset 0 2px 4px rgba(0,0,0,.12),
    0 1px 2px rgba(255,255,255,.8);
  transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1);
  overflow: hidden;
}
.theme-toggle input:checked ~ .tt-track {
  background: linear-gradient(135deg, #2e1a0a, #3d220d, #4a2a0f);
  box-shadow:
    inset 0 2px 8px rgba(0,0,0,.4),
    0 0 16px rgba(248,82,3,.3);
}
.tt-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff, #f0f0f0);
  box-shadow:
    0 2px 8px rgba(0,0,0,.20),
    inset 0 1px 0 rgba(255,255,255,.9);
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1),
              background 0.4s,
              width 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
}
.theme-toggle input:checked ~ .tt-track .tt-thumb {
  transform: translateX(26px);
  background: linear-gradient(145deg, #ffd9c2, #ff9a5c);
  box-shadow:
    0 2px 10px rgba(248,82,3,.45),
    inset 0 1px 0 rgba(255,255,255,.5);
}
.tt-track:active .tt-thumb { width: 28px; }
.theme-toggle input:checked ~ .tt-track:active .tt-thumb {
  transform: translateX(22px);
  width: 28px;
}
.tt-sun, .tt-moon {
  position: absolute;
  font-size: 13px;
  transition: opacity 0.3s, transform 0.4s;
  line-height: 1;
}
.tt-sun  { opacity: 1;  transform: scale(1); }
.tt-moon { opacity: 0;  transform: scale(0.5) rotate(-30deg); }
.theme-toggle input:checked ~ .tt-track .tt-thumb .tt-sun {
  opacity: 0;  transform: scale(0.5) rotate(30deg);
}
.theme-toggle input:checked ~ .tt-track .tt-thumb .tt-moon {
  opacity: 1;  transform: scale(1) rotate(0deg);
}
/* ══ Time & Pax Cards ══ */
.tp-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.tp-card:active { transform: scale(0.97); }
.tp-card.active-card {
  border-color: rgba(248,82,3,.5);
  background: rgba(248,82,3,.06);
}
.tp-top { display: flex; align-items: center; gap: 10px; }
.tp-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: rgba(248,82,3,.12);
  border: 1px solid rgba(248,82,3,.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tp-label {
  font-size: 9px; font-weight: 700;
  color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.8px;
}
.tp-value {
  font-size: 12px; font-weight: 900;
  color: var(--text);
  margin-top: 2px; line-height: 1.2;
}
.tp-value.accent { color: #FF6A1F; font-size: 18px; }

/* ══ TP Overlay & Modal ══ */
.tp-overlay {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  top: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(6px);
  z-index: 250;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0 12px 80px;
}

.tp-overlay.open { display: flex; }
.tp-modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 18px;
  width: 100%; max-width: 420px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  animation: tpUp .3s cubic-bezier(.34,1.56,.64,1);
}
body.dark .tp-modal {
  background: #251c18;
  border-color: rgba(255,255,255,.12);
}
@keyframes tpUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.tp-mhead { display: flex; align-items: center; justify-content: space-between; }
.tp-mtitle {
  font-size: 14px; font-weight: 900; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.tp-mclose {
  width: 28px; height: 28px; border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.06);
  color: var(--text); font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
body.dark .tp-mclose { background: rgba(255,255,255,.07); }
.tp-slbl {
  font-size: 9px; font-weight: 700;
  color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.8px;
  margin-bottom: 6px;
}
.tp-chips {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 7px;
}
.tp-chips-4 { grid-template-columns: repeat(4,1fr); }
.tp-chip {
  padding: 9px 4px; border-radius: 11px;
  border: 1.5px solid var(--border);
  background: rgba(0,0,0,.03);
  text-align: center; cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
body.dark .tp-chip { background: rgba(255,255,255,.04); }
.tp-chip:active { transform: scale(0.92); }
.tp-chip.selected {
  background: rgba(248,82,3,.15);
  border-color: #FF6A1F;
}
.tp-cmain {
  font-size: 12px; font-weight: 900; color: var(--text);
}
.tp-chip.selected .tp-cmain { color: #FF6A1F; }
.tp-csub { font-size: 8px; color: var(--muted); margin-top: 1px; }
.tp-dtinput {
  width: 100%;
  background: rgba(0,0,0,.04);
  border: 1.5px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  font-size: 13px; font-weight: 700;
  padding: 11px 13px; outline: none;
}
body.dark .tp-dtinput {
  background: rgba(0,0,0,.3);
  border-color: rgba(255,255,255,.12);
}
body.dark .tp-dtinput::-webkit-calendar-picker-indicator { filter: invert(1) opacity(.4); }
.tp-dtinput:focus { border-color: rgba(248,82,3,.5); }

/* Flexibel row */
.tp-flex-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(0,0,0,.03);
  border: 1.5px solid var(--border);
  border-radius: 13px; padding: 11px 13px;
  transition: border-color 0.2s, background 0.2s;
  margin-top: 8px;
}
body.dark .tp-flex-row { background: rgba(255,255,255,.04); }
.tp-flex-row.active {
  border-color: rgba(248,82,3,.4);
  background: rgba(248,82,3,.06);
}
.tp-flex-title { font-size: 13px; font-weight: 900; color: var(--text); }
.tp-flex-sub   { font-size: 10px; color: var(--muted); margin-top: 2px; }
.tp-ios-sw { position: relative; width: 48px; height: 28px; cursor: pointer; flex-shrink: 0; }
.tp-ios-sw input { opacity:0; width:0; height:0; position:absolute; }
.tp-ios-track {
  position:absolute; inset:0; border-radius:28px;
  background: rgba(0,0,0,.15); transition: background 0.3s;
}
body.dark .tp-ios-track { background: rgba(255,255,255,.15); }
.tp-ios-sw input:checked ~ .tp-ios-track { background: #FF6A1F; }
.tp-ios-knob {
  position:absolute; top:2px; left:2px;
  width:24px; height:24px; border-radius:50%; background:#fff;
  box-shadow: 0 2px 5px rgba(0,0,0,.25);
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
  pointer-events:none;
}
.tp-ios-sw input:checked ~ .tp-ios-track .tp-ios-knob { transform: translateX(20px); }
.tp-flex-chips {
  display: none; grid-template-columns: repeat(4,1fr); gap: 7px;
  margin-top: 10px;
  margin-bottom: 14px;
}
.tp-flex-chips.show { display: grid; }

/* Confirm */
.tp-confirm {
  width: 100%; height: 42px; border-radius: 11px; border: none;
  background: linear-gradient(180deg, #FF6A1F, #F85203);
  color: #fff; text-shadow:0 1px 2px rgba(0,0,0,.25); font-size: 13px; font-weight: 900; cursor: pointer;
  box-shadow: 0 8px 20px rgba(248,82,3,.3);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
/* ══ Language Dropdown ══ */
.lang-wrap {
  position: relative;
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
}
.lang-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 13px 7px 10px;
  border-radius: 50px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  cursor: pointer;
  direction: ltr;
  transition: transform 0.15s, background 0.3s, border-color 0.3s;
  -webkit-tap-highlight-color: transparent;
}
.lang-btn:active { transform: scale(0.94); }
body.dark .lang-btn {
  background: rgba(20,20,20,.72);
  border-color: rgba(255,255,255,.12);
  box-shadow: 0 4px 20px rgba(0,0,0,.5);
}
.lang-flag { font-size: 18px; line-height: 1; }
.lang-code {
  font-size: 12px; font-weight: 800;
  color: #D94500; letter-spacing: 0.4px;
  transition: color 0.3s;
}
body.dark .lang-code { color: #FF6A1F; }
.lang-arrow {
  width: 13px; height: 13px;
  stroke: #D94500;
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1), stroke 0.3s;
  flex-shrink: 0;
}
body.dark .lang-arrow { stroke: #FF6A1F; }
.lang-wrap.open .lang-arrow { transform: rotate(180deg); }
.lang-drop {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 54px);
  right: 12px;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 18px;
  box-shadow: 0 10px 40px rgba(0,0,0,.14);
  border: 1px solid rgba(0,0,0,.06);
  overflow: hidden;
  min-width: 175px;
  transform-origin: top right;
  transform: scale(0.85) translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(.34,1.56,.64,1), opacity 0.2s ease;
  z-index: 300;
}
.lang-wrap.open .lang-drop {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
body.dark .lang-drop {
  background: rgba(26,18,14,.97);
  border-color: rgba(255,255,255,.09);
  box-shadow: 0 12px 48px rgba(0,0,0,.65);
}
.lang-opt {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 15px;
  cursor: pointer; border: none;
  background: transparent; width: 100%;
  direction: ltr;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.lang-opt + .lang-opt { border-top: 1px solid rgba(0,0,0,.05); }
body.dark .lang-opt + .lang-opt { border-top-color: rgba(255,255,255,.06); }
.lang-opt:active { background: rgba(217,69,0,.06); }
body.dark .lang-opt:active { background: rgba(248,82,3,.08); }
.lang-opt.selected { background: rgba(217,69,0,.07); }
body.dark .lang-opt.selected { background: rgba(248,82,3,.09); }
.opt-flag { font-size: 22px; line-height: 1; flex-shrink: 0; }
.opt-info { flex: 1; text-align: left; }
.opt-name {
  font-size: 14px; font-weight: 800; color: #2b1608;
  transition: color 0.3s;
}
body.dark .opt-name { color: #fff; }
.lang-opt.selected .opt-name { color: #D94500; }
body.dark .lang-opt.selected .opt-name { color: #FF6A1F; }
.opt-native { font-size: 11px; color: #8e8e93; margin-top: 1px; }
body.dark .opt-native { color: rgba(255,255,255,.3); }
.opt-check {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid rgba(0,0,0,.15);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s cubic-bezier(.34,1.56,.64,1);
}
body.dark .opt-check { border-color: rgba(255,255,255,.2); }
.lang-opt.selected .opt-check {
  background: #D94500; border-color: #D94500;
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(217,69,0,.35);
}
body.dark .lang-opt.selected .opt-check {
  background: #FF6A1F; border-color: #FF6A1F;
  box-shadow: 0 0 10px rgba(248,82,3,.4);
}
.lang-opt.selected .opt-check::after {
  content: '';
  width: 7px; height: 7px; border-radius: 50%;
  background: #fff; display: block;
}

/* ══════════════════════════════════════════
   BOEKTAXI HUISSTIJL – afwerking (okt 2026)
   ══════════════════════════════════════════ */

/* Lettertypes gelijk aan website */
body{
  font-family:"Source Sans 3", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing:antialiased;
}
.sheet-title, .route-title, .name, .section-title, .tp-mtitle, .vcard-name{
  font-family:"Zilla Slab", Rockwell, "Roboto Slab", Georgia, serif;
  font-weight:700;
  letter-spacing:-.2px;
}
.sheet-title{ font-size:19px; }
.route-title{ font-size:17px; }
.vcard-name{ font-size:16px; }
.vcard-price{ font-variant-numeric:tabular-nums; }

/* Iconen (SVG) netjes centreren en in merkkleur */
.icon-btn{ color:var(--accent); }
.icon-btn svg, .icon svg, .pickSearch button svg{ display:block; }
.icon{ color:var(--text); }
.tt-sun svg, .tt-moon svg{ display:block; }

/* Autokaarten: foto netjes in een vast vlak */
.vcard-ico{
  width:76px !important;
  height:56px !important;
  margin-left:0 !important;
  border-radius:10px;
  background:rgba(0,0,0,.03);
  justify-content:center !important;
  overflow:hidden !important;
}
body.dark .vcard-ico{ background:rgba(255,255,255,.05); }
.vcard-ico img{
  width:100% !important;
  height:100% !important;
  margin:0 !important;
  object-fit:contain !important;
  border-radius:0 !important;
}
.vcard{ padding:10px 12px; }
.vcard.selected{ box-shadow:0 8px 22px rgba(248,82,3,.12); }

/* Kaarten: rustige, ingetogen uitstraling */
.leaflet-tile-pane{ filter:saturate(.35) brightness(1.05) contrast(.96); }
body.dark .leaflet-tile-pane{ filter:invert(1) hue-rotate(180deg) brightness(.85) contrast(.92) saturate(.3); }
.leaflet-control-attribution{
  font-size:9px !important;
  background:rgba(255,255,255,.72) !important;
  padding:0 5px !important;
  border-radius:6px 0 0 0;
}
body.dark .leaflet-control-attribution{ background:rgba(20,20,20,.7) !important; color:#bbb; }
body.dark .leaflet-control-attribution a{ color:#ddd; }

/* Sheet: zachte overgang van hoogte, knoppen altijd boven de navigatie */
.sheet-card{ transition:max-height .22s ease; }
.sheet.dragging .sheet-card{ transition:none; }

/* Geen vlak achter auto's en iconen: ze gaan op in de kaart */
.vcard-ico,
body.dark .vcard-ico,
.tp-icon,
body.dark .tp-icon{
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  border-radius:0 !important;
}
/* Witte randen in de foto zelf onzichtbaar maken op lichte achtergrond */
body:not(.dark) .vcard-ico img,
body:not(.dark) .tp-icon img{
  mix-blend-mode:multiply;
}


/* ══════════════════════════════════════════
   BOEKFLOW IN 4 STAPPEN (okt 2026)
   ══════════════════════════════════════════ */

/* Kop: terugpijl links, titel, sluiten rechts */
.sheet-head{ gap:12px; padding:14px 16px 12px; }
.sheet-kop-tekst{ flex:1; min-width:0; }
.sheet-terug{
  flex:0 0 40px; width:40px; height:40px; border-radius:50%;
  display:grid; place-items:center; cursor:pointer;
  border:1px solid rgba(0,0,0,.08); background:#fff; color:var(--text);
  box-shadow:0 4px 12px rgba(0,0,0,.06);
}
.sheet-terug svg{ width:20px; height:20px; }
.sheet-terug:active{ transform:scale(.94); }
body.dark .sheet-terug{ background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.12); }
.sheet-terug[hidden]{ display:none; }

/* Stappenbalk: 4 stappen op één regel */
.stepchips{ gap:6px; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; }
.stepchips::-webkit-scrollbar{ display:none; }
.chipstep{ font-size:11px; padding:4px 9px; white-space:nowrap; }

/* Meer lucht in de inhoud */
.sheet-body{ padding:16px; }

/* Eén grote knop onderaan */
.sheet-footer{ padding-top:12px; }
.main-action{
  width:100%; max-width:none; height:54px; border-radius:14px;
  font-size:16px; font-weight:800; text-shadow:none;
  background:var(--accent); box-shadow:0 10px 24px rgba(248,82,3,.28);
}
.main-action:disabled{ opacity:.45; }
.sheet-footer.leeg{ border-top:0; background:transparent !important; padding-top:0; }
.sheet-footer.leeg .main-action{ display:none; }

/* Tijdens de boekflow: onderbalk weg, knop dicht tegen de onderkant */
.bottom{ transition:transform .25s ease, opacity .2s ease; }
body.home-visible.flow-diep .bottom{ transform:translateY(160%); opacity:0; pointer-events:none; }
body.home-visible.flow-diep .bottom-inner{ pointer-events:none; }
body.home-visible.flow-diep .sheet-footer{ padding-bottom:calc(16px + env(safe-area-inset-bottom)); }

/* Reserveknop bij handmatig getypte adressen */
.adres-verder{
  width:100%; margin-top:12px; height:48px; border:0; border-radius:12px;
  display:flex; align-items:center; justify-content:center; gap:8px;
  background:var(--accent); color:#fff; font-weight:800; font-size:15px; cursor:pointer;
}
.adres-verder[hidden]{ display:none; }

/* ══ Stap 4: overzicht ══ */
.ov-kaart #routeMapWrap{ height:150px; margin-bottom:12px; }
.ov-blok{
  background:#fff; border:1px solid rgba(0,0,0,.07); border-radius:14px; padding:12px 14px;
}
body.dark .ov-blok{ background:rgba(255,255,255,.05); border-color:rgba(255,255,255,.08); }
.ov-route{ display:grid; gap:10px; position:relative; }
.ov-punt{ display:flex; gap:12px; align-items:flex-start; }
.ov-dot{ flex:0 0 12px; width:12px; height:12px; margin-top:4px; border-radius:50%; }
.ov-dot.van{ background:var(--accent); box-shadow:0 0 0 3px rgba(248,82,3,.18); }
.ov-dot.stop{ background:#999; }
.ov-dot.naar{ background:#fff; border:3px solid var(--accent); border-radius:3px; }
#ovStops{ display:grid; gap:10px; }
#ovStops:empty{ display:none; }
.ov-lbl{ font-size:12px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.4px; }
.ov-adr{ font-size:15px; font-weight:700; line-height:1.35; margin-top:2px; word-break:break-word; }
.ov-val{ font-size:16px; font-weight:800; margin-top:2px; }
.ov-grid{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:10px 0; }
#ovVoorBlok{ margin-bottom:10px; }
#ovVoorBlok[hidden]{ display:none; }
.ov-totaal{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  background:var(--accent); color:#fff; border-radius:16px; padding:16px 18px;
  box-shadow:0 12px 26px rgba(248,82,3,.25);
}
.ov-totaal .ov-lbl{ color:rgba(255,255,255,.85); }
.ov-sub{ font-size:13px; opacity:.9; margin-top:2px; }
.ov-totaal b{ font:900 28px/1 "Roboto Slab","Zilla Slab",Georgia,serif; font-variant-numeric:tabular-nums; white-space:nowrap; }
.ov-wijzig{
  display:block; margin:14px auto 4px; background:none; border:0; cursor:pointer;
  color:var(--accent); font-weight:800; font-size:14px; text-decoration:underline; text-underline-offset:3px;
}
