/* Driver page: sign-in, the shift bar, the route map and the stop cards. Builds on app.css. */
.dpage { --spring: cubic-bezier(.34, 1.56, .64, 1); --out: cubic-bezier(.2, .8, .2, 1); background: var(--sand); }
.dpage svg[viewBox="0 0 24 24"]:not([fill]) { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[dir=rtl] .dpage .flip { transform: scaleX(-1); }
.dlogo { flex: none; width: 44px; height: 44px; padding: 3px 5px; border-radius: 13px; background: #fbf5ea; object-fit: contain; }

/* ---------- sign-in ---------- */
.dlogin { min-height: 100dvh; display: grid; align-content: center; justify-items: center; gap: 18px; padding: 32px 20px calc(32px + env(safe-area-inset-bottom));
  background: radial-gradient(120% 70% at 50% 0%, #1c5a3f 0%, var(--sea-deep) 60%); color: #fff; text-align: center; }
.dlogin > * { animation: drise .45s var(--out) both; }
.dlogin > :nth-child(2) { animation-delay: .06s; } .dlogin > :nth-child(3) { animation-delay: .12s; } .dlogin > :nth-child(4) { animation-delay: .18s; } .dlogin > :nth-child(5) { animation-delay: .24s; }
.dlogin .dlogo { width: 84px; height: 84px; padding: 6px 9px; border-radius: 24px; box-shadow: 0 18px 40px -12px rgba(0,0,0,.5); }
.dlogin h1 { margin: 0; font: 800 28px/1.25 var(--display); }
.dlogin h1 em { font-style: normal; color: var(--lime); }
.dlogin p { margin: 0; max-width: 34ch; font-size: 16px; line-height: 1.7; color: rgba(255,255,255,.78); }
.dlogin .card { width: min(380px, 100%); display: grid; gap: 14px; padding: 18px; border-radius: 24px; background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.dcta { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 22px; border: 0; border-radius: 99px; background: var(--lime); color: var(--sea-deep);
  font: 700 17px var(--display); text-decoration: none; transition: transform .15s var(--spring); }
.dcta:active { transform: scale(.97); }
.dcta svg { width: 22px; height: 22px; }
.dcta--wa { background: #25d366; color: #06351c; }
.dlink { min-height: 44px; border: 0; background: none; color: rgba(255,255,255,.75); font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.dcode { display: flex; justify-content: center; gap: 6px; direction: ltr; }
.dcode span { display: grid; place-items: center; width: 44px; height: 54px; border-radius: 12px; background: #fff; color: var(--sea-deep); font: 700 26px var(--display); animation: dpop .35s var(--spring) both; }
.dcode span:nth-child(2) { animation-delay: .04s; } .dcode span:nth-child(3) { animation-delay: .08s; } .dcode span:nth-child(4) { animation-delay: .12s; } .dcode span:nth-child(5) { animation-delay: .16s; } .dcode span:nth-child(6) { animation-delay: .2s; }
.dwait { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 15px; color: rgba(255,255,255,.8); }
.dwait::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); border-top-color: var(--lime); animation: dspin .8s linear infinite; }
.dnote { padding: 12px 14px; border-radius: 14px; background: rgba(229,72,77,.18); color: #ffd9da; font-size: 15px; }
.ddemo { display: grid; gap: 8px; width: min(380px, 100%); text-align: start; }
.ddemo a { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px; border-radius: 16px; background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.ddemo a b { font: 600 16px var(--display); }
.ddemo a small { display: block; font-size: 13px; color: rgba(255,255,255,.65); }

/* ---------- top bar ---------- */
.drv { min-height: 100dvh; display: grid; grid-template-rows: auto auto auto 1fr; background: var(--sand); }
.drv__bar { position: sticky; top: 0; z-index: 500; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 14px 12px; background: var(--sea-deep); color: #fff; }
.drv__who { flex: 1; min-width: 0; display: grid; }
.drv__who b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 700 18px/1.25 var(--display); }
.drv__who small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12.5px; line-height: 1.4; color: rgba(255,255,255,.7); }
.drv__who small:first-child { font: 600 11px/1.4 var(--display); letter-spacing: .08em; color: var(--lime); }
.shift { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 99px; background: rgba(255,255,255,.12); color: #fff; font-size: 14px; font-weight: 600; transition: background .2s, color .2s, transform .15s var(--spring); }
.shift:active { transform: scale(.95); }
.shift i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.5); }
.shift[aria-pressed=true] { background: var(--lime); color: var(--sea-deep); }
.shift[aria-pressed=true] i { background: var(--ok); box-shadow: 0 0 0 0 rgba(29,154,91,.6); animation: dping 1.6s infinite; }
.ibtn { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; }
.ibtn svg { width: 21px; height: 21px; }

.dpage .gps { gap: 10px; padding: 10px 14px; font-size: 14px; }
.dpage .gps select { min-height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--sand); }
.dpage .gps select + select { margin-inline-start: 0; }
.drv__map { height: 34dvh; min-height: 220px; }

/* ---------- route summary + stops ---------- */
.drv__list { padding: 14px 14px calc(36px + env(safe-area-inset-bottom)); display: grid; gap: 12px; align-content: start; }
.drv__list > * { animation: drise .35s var(--out) both; animation-delay: calc(var(--i, 0) * 45ms); }
.rsum { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 20px; background: var(--sea-deep); color: #fff; }
.rsum__t { flex: 1; min-width: 0; }
.rsum__t b { display: block; font: 700 17px/1.3 var(--display); }
.rsum__t small { font-size: 13px; color: rgba(255,255,255,.72); }
.rsum .dcta { min-height: 48px; padding: 0 16px; font-size: 15px; }

.stop { position: relative; padding: 14px; border-radius: 20px; background: var(--paper); border: 1px solid var(--line); gap: 10px; }
.stop--next { border: 2px solid var(--sea); box-shadow: var(--shadow); }
.stop__chip { position: absolute; top: -10px; inset-inline-end: 14px; padding: 2px 10px; border-radius: 99px; background: var(--lime); color: var(--sea-deep); font: 700 12px/1.6 var(--display); }
.stop__head b { font: 700 16px/1.35 var(--display); }
.stop__head small { font-size: 13.5px; }
.stop__eta { flex: none; padding: 4px 10px; border-radius: 99px; background: var(--sand); color: var(--ink) !important; font-weight: 600; }
.stop .stop-pin { width: 40px; height: 40px; font-size: 16px; }
.stop .stop-pin--pickup, .stop-pin--pickup { background: var(--sea-deep); border-color: var(--lime); color: var(--lime); }
.stop-pin--pickup svg { width: 18px; height: 18px; }
.stop .stop-pin--pickup svg { width: 21px; height: 21px; }
.stop ul { color: var(--ink); font-size: 15px; line-height: 1.7; }
.bags { display: grid; gap: 8px; }
.bag { padding: 10px 12px; border-radius: 14px; background: var(--sand); }
.bag__h { display: flex; align-items: center; gap: 8px; font: 600 14px var(--display); }
.bag__h svg { width: 18px; height: 18px; color: var(--sea); }
.bag__h small { margin-inline-start: auto; color: var(--muted); font: 500 13px var(--font); }
.bag ul { margin: 6px 0 0; padding-inline-start: 22px; font-size: 14.5px; }
.stop__acts { gap: 8px; }
.stop__acts .btn { min-height: 44px; border-radius: 99px; }
.stop__acts .btn svg { width: 18px; height: 18px; }
.stop__acts .btn--go { flex: 1; background: var(--sea-deep); }
.cash { display: flex; align-items: baseline; gap: 6px; }
.cash b { font: 700 20px var(--display); }
.dpage .empty { padding: 36px 16px; border-radius: 20px; background: var(--paper); border: 1px dashed var(--line); font-size: 15px; }
.dpage .empty svg { display: block; width: 40px; height: 40px; margin: 0 auto 10px; color: var(--sea); }
.skel { height: 120px; border-radius: 20px; background: linear-gradient(90deg, var(--sand-2) 25%, #f0f2ea 50%, var(--sand-2) 75%) 0 0 / 200% 100%; animation: dshim 1.2s linear infinite; }

@keyframes drise { from { opacity: 0; transform: translateY(14px); } }
@keyframes dpop { from { opacity: 0; transform: scale(.6); } }
@keyframes dspin { to { transform: rotate(360deg); } }
@keyframes dshim { to { background-position: -200% 0; } }
@keyframes dping { 70% { box-shadow: 0 0 0 7px rgba(29,154,91,0); } 100% { box-shadow: 0 0 0 0 rgba(29,154,91,0); } }

/* Driver entry uses the same brand row in the welcome and demo screens. */
.dlogin { display:block; min-height:100dvh; padding:0; background:#f7f5ec; color:#173c30; text-align:start; }
.driver-brand { display:flex; align-items:center; gap:12px; min-height:64px; padding: max(8px,env(safe-area-inset-top)) max(18px,calc((100vw - 880px)/2)) 8px; color:#163e30; background:#f7f5ec; border-bottom:1px solid #d9ded1; position:sticky; top:0; z-index:10; }
.driver-brand a { display:inline-flex; align-items:center; gap:8px; color:inherit; text-decoration:none; font:800 16px var(--display); letter-spacing:.06em; }
.driver-brand > span { padding-inline-start:10px; border-inline-start:1px solid #bdc9bb; font-size:13px; }
.driver-brand site-language { margin-inline-start:auto; }
.driver-welcome,.demo-main { max-width:880px; margin:0 auto; padding:clamp(22px,6vw,72px) 18px; }
.driver-welcome { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr); align-items:center; gap:clamp(24px,5vw,66px); }
.shift-intro { background:#103f31; color:#fbfbef; border-radius:24px; padding:clamp(22px,4vw,38px); }
.dlogin h1 { font:700 clamp(29px,4.5vw,44px)/1.18 var(--display); text-wrap:balance; margin:20px 0 12px; }
.shift-intro p,.demo-main p { max-width:43ch; line-height:1.55; }
.delivery-line { display:flex; align-items:center; width:min(240px,85%); color:#d6edac; }
.delivery-line i { flex:1; border-top:2px dashed #81aa83; }
.delivery-line span,.delivery-line b { width:38px; height:38px; display:grid; place-items:center; border:1px solid #6b9276; border-radius:100%; }
.delivery-line b { color:#163e30; background:#c7eb83; }
.delivery-line svg { width:20px; height:20px; }
.signin-actions { margin-top:22px; display:grid; gap:10px; }
.signin-actions small { color:#d3dfd1; font-size:13px; line-height:1.45; }
.shift-guide h2 { font:700 23px/1.3 var(--display); margin:0 0 18px; }
.shift-guide ol { list-style:none; padding:0; margin:0; }
.shift-guide li { display:flex; align-items:baseline; gap:14px; padding:14px 0; border-top:1px solid #d2daca; }
.shift-guide li>b { font:600 13px var(--display); color:#537457; }
.shift-guide strong { font:650 17px var(--display); }
.shift-guide li p,.demo-main p { color:#455d4d; line-height:1.5; font-size:15px; margin:4px 0 0; }
.demo-main { max-width:510px; }
.demo-main .ddemo { margin-top:24px; width:100%; }
.demo-main .ddemo a { color:var(--sea-deep); background:#e7ecdc; }
.demo-main .ddemo small,.demo-main .dlink { color:#405f4a; }
.dlogin .dcode { gap:3px; }
.dcode span { width:min(40px,13%); }
.dlogin > .driver-brand { animation:none; }
@media(max-width:680px){ .driver-welcome { grid-template-columns:1fr; max-width:490px; } }
@media(prefers-reduced-motion:reduce){ .dlogin * { animation:none!important; } }
