/* Hoja de un pedido (solo lectura): Estado · Productos · Zona en una fila, cards horizontales y total tipo carrito (retoma C, 2026-10-29) */
.pl-tres{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr) minmax(0,1fr);background:var(--card);border-radius:var(--r,14px);box-shadow:var(--sh);margin-bottom:4px}
.pl-t{min-width:0;padding:11px 12px}
.pl-t + .pl-t{box-shadow:inset 1px 0 0 var(--gris-soft)}
.pl-t small{display:flex;align-items:center;gap:5px;font-size:11.5px;font-weight:700;color:var(--text2);margin-bottom:6px}
.pl-t small svg{width:14px;height:14px;color:var(--text3);flex-shrink:0}
.pl-v{font-size:14.5px;font-weight:750;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pl-v .est{display:inline-flex;align-items:center;max-width:100%;height:auto;min-height:22px;padding:3px 9px;white-space:normal;line-height:1.2;box-sizing:border-box}
.pl-v em{font-style:normal;font-size:12px;font-weight:650;color:var(--text2)}
.pl-nada{color:var(--text3)}
.pl-err{margin:8px 2px 0;font-size:12.5px;font-weight:600;color:var(--red)}
.hoja-pie [data-repetir]:disabled{opacity:.5}

/* Hoja A4 del pedido: avance y vista previa */
.hp-avance{padding:26px 6px 10px;text-align:center}
.hp-barra{height:8px;border-radius:99px;background:var(--gris-soft);overflow:hidden}
.hp-barra i{display:block;height:100%;width:0;border-radius:99px;background:var(--red);transition:width .25s ease}
.hp-txt{margin:12px 0 0;font-size:13.5px;font-weight:700;color:var(--text2);text-align:center}
.hp-prev{margin:6px auto 0;max-width:260px;border-radius:10px;background:#fff;box-shadow:var(--sh),0 0 0 1px var(--gris-soft);overflow:hidden}
.hp-prev img{display:block;width:100%;height:auto}
.hp-bts{display:flex;flex-direction:column;gap:8px;margin-top:14px}

/* Ventana de 10 minutos (Trazo 0122): aro con la cuenta regresiva + Enviar ya · Editar · Borrar */
.vent{background:var(--card);border-radius:var(--r);box-shadow:var(--sh);padding:12px 14px;margin:10px 0 8px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:4px 12px}
.vent-aro{position:relative;flex:none;width:48px;height:48px;display:grid;place-items:center;color:var(--ambar)}
.vent-aro i{position:absolute;inset:0;border-radius:50%;--p:1;background:conic-gradient(var(--ambar) calc(var(--p) * 360deg),var(--ambar-soft) 0);
  -webkit-mask:radial-gradient(circle,transparent 18px,#000 19px);mask:radial-gradient(circle,transparent 18px,#000 19px);transition:background .9s linear}
.vent-aro svg{width:20px;height:20px}
.vent-tx{display:flex;flex-direction:column;min-width:0}
.vent-tx small{font-size:12px;font-weight:700;color:var(--text2)}
.vent-cont{font-size:26px;font-weight:850;line-height:1.1;font-variant-numeric:tabular-nums;color:var(--ambar)}
.vent-ya{height:42px;padding:0 14px;font-size:14px;gap:6px;white-space:nowrap}
.vent-ya svg{width:16px;height:16px}
.vent-nota-l{margin:-4px 0 10px;text-align:center;font-size:12px;font-weight:600;color:var(--text3)}
.vent.pend .vent-aro i{opacity:.6}
.vent.pausa .vent-cont{font-size:20px;color:var(--text2)}
.vent.pausa .vent-aro{color:var(--text3)}
.vent.pausa .vent-aro i{background:var(--gris-soft)}
.btn.peligro{color:var(--red)}
/* Barra de abajo con la ventana corriendo: [borrar cuadrado] [Editar] y el botón principal (Listo / total) a la derecha */
.hoja-pie.pie-v{display:flex;align-items:center;gap:8px}
/* "Listo" solo (sin internet, o cuando la ventana ya se venció): a la derecha, como los demás botones de acción (dueño, 2026-11-03) */
.hoja-pie:not(.pie-v):has(> [data-listo]:only-child){display:flex;justify-content:flex-end}
.pie-acc{display:contents}
.hoja-pie.pie-v > .btn.pri{flex:1;min-width:0}
.hoja-pie.pie-v .pie-acc .btn{height:48px;flex:none}
.btn.cuad{width:48px;padding:0;display:inline-flex;align-items:center;justify-content:center}
.btn.cuad svg{width:20px;height:20px}
.hoja-pie.pie-v .pie-2{flex:1;min-width:0}
.vent-pasado{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:10px 0}
.vent-pasado .btn{height:auto;min-height:48px;padding:8px 10px;font-size:13.5px;line-height:1.2;text-align:left}
.vent-movs{background:var(--card);border-radius:var(--r);box-shadow:var(--sh);margin:10px 0;overflow:hidden}
.vent-movs summary{list-style:none;display:flex;align-items:center;gap:6px;padding:13px 14px;font-weight:800;font-size:14px;cursor:pointer}
.vent-movs summary::-webkit-details-marker{display:none}
.vent-movs summary .n{font-size:12px;font-weight:700;color:var(--text2)}
.vent-movs summary svg{width:16px;height:16px;margin-left:auto;color:var(--text3);transition:transform .2s}
.vent-movs[open] summary svg{transform:rotate(90deg)}
.vent-movs ol{list-style:none;margin:0;padding:0 14px 12px;display:flex;flex-direction:column;gap:10px}
.vent-movs li{display:grid;grid-template-columns:28px minmax(0,1fr) auto;gap:10px;align-items:start}
.vent-movs .mi{width:28px;height:28px;border-radius:9px;display:grid;place-items:center;background:var(--card2);color:var(--text2)}
.vent-movs .mi svg{width:15px;height:15px}
.vent-movs .mt{display:flex;flex-direction:column;min-width:0}
.vent-movs .mt b{font-size:13.5px}
.vent-movs .mt small{font-size:12px;color:var(--text2);font-weight:600}
.vent-movs time{font-size:11.5px;color:var(--text3);font-weight:700;white-space:nowrap}
.vent-senales{display:flex;flex-direction:column;gap:8px}
.vent-senal{background:var(--card);border-radius:var(--r);box-shadow:var(--sh);padding:12px 14px;display:flex;flex-direction:column;gap:4px;align-items:flex-start}
.vent-senal small{font-size:12.5px;color:var(--text2);font-weight:600}
.vent-senal .est{margin-top:4px}
.vent-nota{margin:4px 2px;font-size:12px;font-weight:600;color:var(--text2)}
.vent-nota.fuerte{display:flex;gap:8px;align-items:flex-start;background:var(--ambar-soft);color:var(--text);border-radius:12px;padding:10px 12px;margin:0 0 12px;font-size:13px}
.vent-nota.fuerte svg{width:18px;height:18px;flex:none;color:var(--ambar)}
.vent-its{display:flex;flex-direction:column;gap:6px;margin-bottom:12px}
.vent-its div{display:flex;justify-content:space-between;gap:8px;font-size:13.5px;font-weight:650}

/* Resumen del pedido (confirmar y enviado): cliente + productos / unidades / total en tres columnas */
.res-card{background:var(--card2);border-radius:14px;padding:12px;text-align:left}
.res-cli{display:flex;align-items:center;justify-content:center;gap:10px;margin-bottom:12px;text-align:left}
.res-cli > div{min-width:0}
.res-cli .av{width:36px;height:36px;border-radius:11px;background:var(--card);box-shadow:var(--sh);display:grid;place-items:center;flex:none;color:var(--text2)}
.res-cli .av svg{width:18px;height:18px}
.res-cli b{display:block;font-size:15px;font-weight:850;line-height:1.2;overflow-wrap:anywhere}
.res-cli .cod{color:var(--text3);font-weight:700}
.res-cli small{display:block;font-size:12px;font-weight:650;color:var(--text2);margin-top:1px}
/* Tres cifras con presencia: cada una en su casilla, centrada, con ícono; el total más ancho y con el acento */
.res-tres{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.35fr);gap:8px}
.res-tres > div{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:0;padding:10px 6px;background:var(--card);border-radius:12px;box-shadow:var(--sh);text-align:center}
.res-tres .ri{display:grid;place-items:center;width:26px;height:26px;border-radius:9px;background:var(--card2);color:var(--text2);margin-bottom:3px}
.res-tres .ri svg{width:14px;height:14px}
.res-tres b{font-size:19px;font-weight:850;font-variant-numeric:tabular-nums;white-space:nowrap;line-height:1.1}
.res-tres small{font-size:11px;font-weight:700;color:var(--text3)}
.res-tres .tot{background:var(--red-soft,rgba(232,24,30,.09))}
.res-tres .tot .ri{background:var(--red);color:#fff}
.res-tres .tot b{font-size:20px}
.res-nota{display:flex;gap:7px;align-items:flex-start;justify-content:center;margin:10px 2px 0!important;font-size:12px!important;font-weight:600;color:var(--text2)!important;line-height:1.35;text-align:center}
.res-nota span{text-wrap:balance}
.res-nota svg{width:14px;height:14px;flex:none;margin-top:1px;color:var(--text3)}
.cfm-c .res-card{margin:2px 0 16px}
.hoja .estado-envio{margin:2px 0 12px;text-align:center;font-size:13.5px;font-weight:700;color:var(--text2)}
.hoja .estado-envio.carga{animation:latido 1.1s ease-in-out infinite}
@keyframes latido{50%{opacity:.45}}
/* Detalle de un pedido en ventana: [total] [borrar] [Editar] en una sola fila (Repetir vuelve al vencer) */
.hoja-pie .pie-2:has(.pie-acc){display:flex;align-items:center;gap:8px}
.hoja-pie .pie-2:has(.pie-acc) .pie-total{flex:none}
.hoja-pie .pie-2:has(.pie-acc) .pie-acc [data-v="editar"]{flex:1;min-width:0;background:var(--red);color:#fff;box-shadow:0 6px 16px rgba(232,24,30,.28)}
.hoja-pie .pie-2:has(.pie-acc) [data-repetir][hidden]{display:none}

/* Guardar para después (cabecera) y Descartar (al final del cuerpo, pegado abajo si el pedido es corto; dueño, 2026-11-01) */
.hoja-acc.con-txt{width:auto;padding:0 13px;gap:6px;font:800 13px/1 inherit;color:var(--text)}
.hoja-acc.con-txt[hidden]{display:none}
.hoja-acc.con-txt svg{width:17px;height:17px}
.hoja.pedido .h-descartar{margin-top:10px;padding:12px 0 6px;border-top:1px solid var(--gris-soft)}
.hoja.pedido .h-descartar:empty{display:none}
.btn-descartar{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;height:44px;border:0;border-radius:12px;background:transparent;color:var(--red);font:800 14px/1 inherit}
.btn-descartar svg{width:18px;height:18px}
.btn-descartar:active{background:var(--card)}
html.con-teclado .hoja.pedido .h-descartar,.hoja.pedido.buscando .h-descartar{display:none}
/* Descartar como botón de verdad (dueño, 2026-11-01): el mismo formato de botón con sombra que el resto, sin competir con Confirmar, que es el sólido */
.btn-descartar{background:var(--card);box-shadow:var(--sh);transition:background .15s,transform .1s}
.btn-descartar:active{background:rgba(232,24,30,.12);transform:scale(.985)}
.hoja.pedido .h-descartar{padding:12px 0 8px}
