body.vd { height: auto; min-height: 100%; background: var(--bg); }
.vd .login { min-height: 100vh; }
.vd-top { position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); background: var(--surface); border-bottom: 1px solid var(--line); }
.vd-top .logo { height: 28px; }
.vd-status { display: flex; align-items: center; gap: 6px; }
.vd-pending { margin: 0; padding: 8px 14px; background: color-mix(in srgb, var(--warn) 18%, var(--surface)); color: var(--ink); font-size: 13px; text-align: center; }
.vd-main { max-width: 640px; margin: 0 auto; padding: 14px 14px calc(96px + env(safe-area-inset-bottom)); }
.vd-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.vd-nav button { font: inherit; font-size: 12px; font-weight: 600; padding: 14px 4px; min-height: 52px; border: 0; border-top: 3px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.vd-nav button[aria-current="page"] { color: var(--ink); border-top-color: var(--orange); }
.vd h2 { font-size: 20px; margin: 4px 0 10px; }
.vd h3 { font-size: 15px; margin: 18px 0 8px; }
.vd-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.vd-big { display: flex; flex-direction: column; gap: 10px; margin: 10px 0 14px; }
.vd-big .btn { min-height: 64px; font-size: 18px; }
.vd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.vd-grid .stat .v { font-size: 16px; }
.vd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.vd-list li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; }
.vd-list button.row { all: unset; display: grid; gap: 2px; width: 100%; cursor: pointer; }
.vd-list .t { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.vd-list .s { font-size: 13px; color: var(--muted); }
.vd-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.vd-pick .btn { flex: 1 1 30%; min-height: 52px; }
.vd-pick .btn[aria-pressed="true"] { background: var(--accent-bg); color: var(--accent-ink); border-color: var(--accent-bg); }
.vd-pick .btn:disabled { opacity: .45; }
.vd-prod { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.vd-prod .n { font-weight: 600; }
.vd-prod .p { font-size: 13px; color: var(--muted); }
.vd-prod .vd-last { color: var(--ink); }
.vd-price { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.vd-price input { width: 120px; text-align: right; font-size: 17px; font-weight: 600; }
.vd-qty { display: flex; align-items: center; gap: 6px; }
.vd-qty button { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 22px; cursor: pointer; }
.vd-qty output { min-width: 34px; text-align: center; font-weight: 700; font-size: 18px; }
.vd-foot { position: fixed; left: 0; right: 0; bottom: calc(52px + env(safe-area-inset-bottom)); z-index: 25; background: var(--surface); border-top: 1px solid var(--line); padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vd-foot b { font-size: 20px; }
.vd-foot .btn { min-height: 48px; padding: 8px 18px; }
.vd-warn { color: var(--warn); font-size: 13px; margin: 4px 0; }
.vd-bad { color: var(--danger); font-size: 13px; margin: 4px 0; }
.vd-ok { color: var(--ok); font-size: 13px; margin: 4px 0; }
.vd-photo img { max-width: 100%; max-height: 180px; border-radius: 10px; display: block; margin-top: 8px; }
.vd-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(120px + env(safe-area-inset-bottom)); z-index: 60; background: #111; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; max-width: 90vw; }
.vd input[type="search"], .vd input[type="text"], .vd input[type="number"], .vd input[type="tel"] { margin: 4px 0 8px; }
.vd .chip.off { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }

.vd-card > .t { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.vd-next { display: block; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; border-left: 4px solid var(--orange); }
.vd-next .t { display: flex; justify-content: space-between; gap: 8px; }
.vd-next .s { font-size: 13px; color: var(--muted); margin-top: 2px; }
.vd-stops { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.vd-stops li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.vd-stops li.next { border-color: var(--orange); box-shadow: 0 0 0 2px color-mix(in srgb, var(--orange) 30%, transparent); }
.vd-stops li.done { opacity: .6; }
.vd-n { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-bg); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.vd-st { display: grid; gap: 3px; min-width: 0; }
.vd-st .s { font-size: 13px; color: var(--muted); }
.vd-stbtns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.vd-stbtns .btn { min-height: 40px; display: inline-grid; place-items: center; text-decoration: none; }
.vd-prod2 { display: grid; gap: 8px; }
.vd-prod2 > .n { font-weight: 700; font-size: 17px; }
.vd-prod2 > .p { font-size: 13px; color: var(--muted); }
.vd-pres { border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 6px; }
.vd-pres.off { opacity: .6; }
.vd-pres-top { display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; align-items: center; }
.vd-pres .n2 { font-weight: 600; }
.vd-pres .p { font-size: 13px; color: var(--muted); }
.vd-pres .vd-last { color: var(--ink); }
.vd-qty button:disabled { opacity: .35; }
.vd-newc { display: grid; gap: 10px; }
.vd-newc label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }

.vd-prod2 > .vd-pres-top { padding-top: 6px; }
.vd-qty .vd-half { width: 48px; font-size: 20px; font-weight: 700; }
.vd-qty .vd-half[aria-pressed="true"] { background: var(--accent-bg); color: var(--accent-ink); border-color: var(--accent-bg); }

.vd-count { font-size: 13px; margin: 2px 2px 8px; }
.vd-list mark { background: #ffe08a; color: inherit; border-radius: 3px; padding: 0 1px; }
html[data-theme="dark"] .vd-list mark { background: #7a5c00; color: #fff; }

.vd-thumb { display: inline-grid; place-items: center; flex: none; border-radius: 12px; overflow: hidden; background: #fff; border: 1px solid var(--line); vertical-align: middle; }
.vd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vd-thumb.empty { background: color-mix(in srgb, var(--accent-bg) 18%, var(--surface)); color: var(--accent); font-weight: 700; }
.vd-head { display: flex; align-items: center; gap: 12px; }
.vd-head > div { min-width: 0; }
.vd-prodname { display: inline-flex; align-items: center; gap: 10px; }

.vd-noloose { border-top: 1px solid var(--line); padding-top: 8px; font-size: 13px; color: var(--muted); }

.vd-stk { display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px 12px; margin: 8px 0; }
.vd-stk-head, .vd-stk-row { display: grid; grid-template-columns: 1fr 84px 84px; gap: 8px; align-items: center; }
.vd-stk-head { font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 0 4px; }
.vd-stk-head span:not(:first-child) { text-align: right; }
.vd-stk-row { padding: 8px 0; border-top: 1px solid var(--line); }
.vd-stk-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vd-stk-name > div { display: grid; line-height: 1.2; min-width: 0; }
.vd-stk-name b { font-size: 14px; font-weight: 600; }
.vd-stk-name small { color: var(--muted); font-size: 12px; }
.vd-stk-row input { width: 100%; min-height: 44px; padding: 6px 8px; text-align: right; }
.vd-stk-row input::placeholder { font-size: 11px; }
.vd-stk-row > .muted { text-align: right; margin: 0; }

/* tareas de servicio técnico en cada parada de la ruta (instalar, mantener, retirar, reparar) */
.vd-task { display: block; width: 100%; text-align: left; font: inherit; font-weight: 600; font-size: 14px; line-height: 1.3; padding: 10px 12px; margin: 6px 0; border-radius: 10px; border: 1px solid var(--orange); background: rgba(var(--brand-rgb, 255, 64, 0), .08); color: var(--ink); cursor: pointer; }

/* ===== Aspecto nuevo de la app del chofer (mismo lenguaje que el mapa, Gestión y Panel) ===== */
body.ui-nuevo.vd .vd-top { box-shadow: 0 6px 20px rgba(20, 24, 28, .05); }
body.ui-nuevo.vd .vd-top .chip { white-space: nowrap; }
@media (max-width: 440px) { body.ui-nuevo.vd .vd-top .wordmark small { display: none; } body.ui-nuevo.vd .vd-top .wordmark { font-size: 16px; } }
body.ui-nuevo.vd .vd-pending { border-radius: 14px; margin: 10px 12px 0; }
body.ui-nuevo.vd .vd-main { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
body.ui-nuevo.vd .vd-card, body.ui-nuevo.vd .vd-list li, body.ui-nuevo.vd .vd-stops li, body.ui-nuevo.vd .vd-stk {
  border-radius: 18px; box-shadow: 0 1px 2px rgba(20, 24, 28, .04), 0 8px 22px rgba(20, 24, 28, .05); }
body.ui-nuevo.vd .vd-next { border-left-width: 5px; }
body.ui-nuevo.vd .vd-big .btn { border-radius: 18px; min-height: 66px; }
body.ui-nuevo.vd .vd-pick .btn { border-radius: 14px; }
body.ui-nuevo.vd .vd-qty button { border-radius: 12px; }
body.ui-nuevo.vd .vd-stops li.next { box-shadow: 0 0 0 2px color-mix(in srgb, var(--orange) 35%, transparent), 0 8px 22px rgba(20, 24, 28, .08); }
body.ui-nuevo.vd .vd-task { border-radius: 14px; }
body.ui-nuevo.vd .vd-toast { border-radius: 16px; bottom: calc(100px + env(safe-area-inset-bottom)); }

/* barra de abajo: flota, con ícono sobre cada texto y la pantalla activa en oscuro */
body.ui-nuevo.vd .vd-nav { left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 6px; gap: 2px; border: 1px solid var(--glass-line, var(--line)); border-radius: 26px;
  background: var(--glass, var(--surface)); box-shadow: 0 10px 30px rgba(20, 24, 28, .18); }
body.ui-nuevo.vd .vd-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; padding: 6px 1px; border: 0; border-radius: 20px; font-size: 10.5px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; }
body.ui-nuevo.vd .vd-nav button[aria-current="page"] { background: var(--ink); color: var(--surface); border-top-color: transparent; }
body.ui-nuevo.vd .vd-nav button::before { content: ""; width: 22px; height: 22px; background: currentColor; -webkit-mask: var(--i, none) center / contain no-repeat; mask: var(--i, none) center / contain no-repeat; }
body.ui-nuevo.vd .vd-nav [data-go="home"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 10 9-7 9 7v10a1 1 0 0 1-1 1h-5v-7H9v7H4a1 1 0 0 1-1-1z'/%3E%3C/svg%3E"); }
body.ui-nuevo.vd .vd-nav [data-go="route"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='19' r='3'/%3E%3Cpath d='M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15'/%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3C/svg%3E"); }
body.ui-nuevo.vd .vd-nav [data-go="sale"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='21' r='1'/%3E%3Ccircle cx='19' cy='21' r='1'/%3E%3Cpath d='M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12'/%3E%3C/svg%3E"); }
body.ui-nuevo.vd .vd-nav [data-go="collect"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='14' x='2' y='5' rx='2'/%3E%3Cpath d='M2 10h20'/%3E%3Cpath d='M6 15h.01M10 15h4'/%3E%3C/svg%3E"); }
body.ui-nuevo.vd .vd-nav [data-go="settle"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='8' height='4' x='8' y='2' rx='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='m9 14 2 2 4-4'/%3E%3C/svg%3E"); }
body.ui-nuevo.vd .vd-nav [data-go="history"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
body.ui-nuevo.vd .vd-nav [data-go="service"] { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z'/%3E%3C/svg%3E"); }
body.ui-nuevo.vd .vd-foot { left: 10px; right: 10px; bottom: calc(86px + env(safe-area-inset-bottom)); border: 1px solid var(--glass-line, var(--line)); border-radius: 20px; box-shadow: 0 10px 30px rgba(20, 24, 28, .16); }
