:root {
  --fondo: #f4f6f4; --superficie: #ffffff; --texto: #18201b; --suave: #5d6b62; --borde: #dde3de;
  --marca: #1f7a4d; --marca-texto: #ffffff; --alerta: #b26a00; --mal: #c0392b; --ok: #1f7a4d; --pend: #fff7e0;
  --radio: 12px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --fondo: #101411; --superficie: #1a201c; --texto: #e7ece8; --suave: #9aa79f; --borde: #2c352f; --marca: #3aa872; --pend: #2b2716; --alerta: #f0a63a; --mal: #ff6b5b; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fondo); color: var(--texto); font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
button, input { font: inherit; color: inherit; }
button { background: var(--superficie); border: 1px solid var(--borde); border-radius: 10px; padding: .6rem .9rem; min-height: 44px; cursor: pointer; }
button.primario { background: var(--marca); color: var(--marca-texto); border-color: var(--marca); font-weight: 600; }
button.peligro { color: var(--mal); border-color: var(--mal); background: transparent; }
button.icono { min-width: 44px; padding: .4rem; background: transparent; border: none; font-size: 1.1rem; }
button.enlace { background: none; border: none; color: var(--marca); padding: 0; min-height: 0; text-decoration: underline; }
button.ancho { width: 100%; margin-top: .5rem; }
input { width: 100%; padding: .65rem .75rem; border: 1px solid var(--borde); border-radius: 10px; background: var(--superficie); min-height: 44px; }
label { display: block; margin: .6rem 0; color: var(--suave); font-size: .9rem; }
label input { margin-top: .25rem; color: var(--texto); font-size: 1rem; }
label.check { display: flex; gap: .5rem; align-items: center; }
label.check input { width: auto; min-height: 0; margin: 0; }
h1, h2, h3 { margin: .2rem 0; line-height: 1.2; }
h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
small { display: block; color: var(--suave); font-size: .82rem; }
.mal { color: var(--mal); } .alerta { color: var(--alerta); } .ok { color: var(--ok); }

#app { max-width: 720px; margin: 0 auto; padding-bottom: 84px; }
.barra { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; padding: .55rem 16px; background: var(--marca); color: var(--marca-texto); }
.barra .sync { min-height: 32px; padding: .2rem .7rem; border-radius: 99px; border: none; font-size: .85rem; background: rgba(255,255,255,.18); color: inherit; }
.barra .sync.alerta { background: #f0a63a; color: #222; } .barra .sync.mal { background: #c0392b; color: #fff; }
main { padding: 12px 16px; }
.pestanas { position: fixed; bottom: 0; left: 0; right: 0; z-index: 5; display: flex; background: var(--superficie); border-top: 1px solid var(--borde); padding-bottom: env(safe-area-inset-bottom); }
.pestanas button { flex: 1; border: none; border-radius: 0; background: none; display: flex; flex-direction: column; align-items: center; font-size: .72rem; padding: .35rem 0; position: relative; color: var(--suave); min-height: 56px; }
.pestanas button span { font-size: 1.25rem; }
.pestanas button.on { color: var(--marca); font-weight: 700; }
.badge { position: absolute; top: 4px; right: calc(50% - 22px); background: var(--mal); color: #fff; font-style: normal; font-size: .68rem; border-radius: 99px; padding: 0 .38rem; }

.fila { display: flex; gap: .5rem; align-items: center; margin: .5rem 0; flex-wrap: wrap; }
.fila > input { flex: 1; min-width: 0; }
.fila > select#f-prov { flex: 0 1 45%; min-width: 0; text-overflow: ellipsis; }
.fila.entre { justify-content: space-between; }
.pegajosa { position: sticky; top: 50px; z-index: 4; background: var(--fondo); padding: .4rem 0; margin: -.4rem 0 .4rem; }
.seg { display: inline-flex; border: 1px solid var(--borde); border-radius: 10px; overflow: hidden; }
.seg button { border: none; border-radius: 0; background: var(--superficie); }
.seg button.on { background: var(--marca); color: var(--marca-texto); }

.lista { list-style: none; margin: 0; padding: 0; }
.item, .bloque { background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); padding: .65rem .75rem; margin: .45rem 0; }
.item { display: flex; justify-content: space-between; gap: .6rem; align-items: center; }
.item > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.item[data-sku], .item[data-acc], .item[data-c] { cursor: pointer; }
.der { text-align: right; white-space: nowrap; }
.acciones { display: flex; gap: .3rem; align-items: center; flex-shrink: 0; }
.acciones button { min-height: 38px; padding: .3rem .6rem; }
.pend { background: var(--pend); }
.pend::after { content: "por subir"; font-size: .7rem; color: var(--alerta); }
.bloque.pend::after { display: block; }
.lineas { margin: .4rem 0; padding-left: 1.1rem; }
.lineas li { margin: .15rem 0; }
.lineas small { display: inline; }
.fotos { display: flex; gap: .4rem; flex-wrap: wrap; }
.fotos button { min-height: 36px; padding: .2rem .6rem; }
.grupo { margin: 1rem 0 .2rem; display: flex; align-items: center; gap: .4rem; }
.pill { background: var(--borde); border-radius: 99px; padding: 0 .5rem; font-size: .8rem; }
.chip { border-radius: 99px; padding: .1rem .6rem; font-size: .8rem; border: 1px solid currentColor; }
.chip.enviado { color: var(--alerta); } .chip.aprobado { color: var(--ok); } .chip.rechazado { color: var(--mal); }
.vacio { color: var(--suave); text-align: center; padding: 1rem; }
.nota { color: var(--suave); font-size: .88rem; }
.tarjeta { background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); padding: .8rem 1rem; margin: .7rem 0; }
.pie { color: var(--suave); text-align: center; font-size: .8rem; }
.ficha { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin: .8rem 0; }
.ficha dt { color: var(--suave); } .ficha dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.botones { display: grid; gap: .5rem; }
.producto-sel { width: 100%; text-align: left; font-weight: 600; }

.ingreso { padding: 24px 16px; }
details.tarjeta summary { cursor: pointer; color: var(--suave); }
details[open].tarjeta summary { margin-bottom: .5rem; }
.ingreso h1 { color: var(--marca); text-align: center; margin: 1rem 0; }

.dlg { border: none; border-radius: 16px 16px 0 0; padding: 0 16px 16px; width: 100%; max-width: 720px; max-height: 92vh; margin: auto auto 0; background: var(--fondo); color: var(--texto); overflow-y: auto; }
.dlg::backdrop { background: rgba(0,0,0,.45); }
.dlg header { position: sticky; top: 0; background: var(--fondo); display: flex; justify-content: space-between; align-items: center; padding: .8rem 0 .4rem; z-index: 1; }
.escaner { position: relative; background: #000; border-radius: var(--radio); overflow: hidden; aspect-ratio: 4 / 3; }
.escaner-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.escaner-marco { position: absolute; inset: 30% 10%; border: 3px solid rgba(255,255,255,.85); border-radius: 10px; box-shadow: 0 0 0 999px rgba(0,0,0,.25); }
.foto-grande { width: 100%; border-radius: var(--radio); }

.aviso { position: fixed; left: 16px; right: 16px; bottom: 90px; z-index: 50; background: #18201b; color: #fff; padding: .75rem 1rem; border-radius: 12px; opacity: 0; transform: translateY(10px); transition: .2s; pointer-events: none; max-width: 688px; margin: 0 auto; }
.aviso.visible { opacity: 1; transform: none; }
.aviso.error { background: #c0392b; }

.reporte table { width: 100%; border-collapse: collapse; font-size: .85rem; margin: .3rem 0 1rem; }
.reporte th, .reporte td { border-bottom: 1px solid var(--borde); padding: .3rem; text-align: left; }
.reporte h1 { font-size: 1.1rem; }


/* ---------- v0.4 ---------- */
/* Escáner dentro de la APK: la cámara va DETRÁS de la web, así que todo se vuelve transparente menos la capa. */
html.escaneando, html.escaneando body { background: transparent !important; }
html.escaneando #app, html.escaneando .aviso, html.escaneando dialog:not(.dlg-capa):not(.dlg-sobre-escaner) { visibility: hidden; }
html.escaneando dialog::backdrop { background: transparent; }
.dlg-capa { border: 0; padding: 0; margin: 0; width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none; background: transparent; color: #fff; }
.dlg-capa::backdrop { background: transparent; }
.capa-escaner { display: flex; flex-direction: column; justify-content: space-between; height: 100%; }
.capa-escaner header, .capa-escaner footer { background: rgba(0,0,0,.62); padding: .7rem 16px; display: flex; flex-direction: column; gap: .4rem; }
.capa-escaner header { flex-direction: row; justify-content: space-between; align-items: center; padding-top: max(.7rem, env(safe-area-inset-top)); }
.capa-escaner footer { padding-bottom: max(.9rem, env(safe-area-inset-bottom)); }
.capa-escaner button { color: #fff; background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); }
.capa-escaner button.primario { background: var(--marca); }
.capa-escaner input { background: rgba(0,0,0,.4); color: #fff; border-color: rgba(255,255,255,.35); }
.capa-escaner #esc-msg { margin: 0; font-size: 1.05rem; min-height: 2.6em; }
.capa-escaner #esc-msg.mal { color: #ff8a7d; }
.escaner-marco-nativo { margin: 0 8%; height: 26vh; border: 3px solid rgba(255,255,255,.9); border-radius: 12px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.28); }

/* Dashboard */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: .5rem; margin: .5rem 0; }
.kpi { background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); padding: .55rem .6rem; text-align: left; min-height: 0; display: block; width: 100%; }
.kpi b { display: block; font-size: 1.45rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi small { font-size: .78rem; }
.kpi.mal b { color: var(--mal); } .kpi.alerta b { color: var(--alerta); } .kpi.ok b { color: var(--ok); }
.saludo { margin: .3rem 0 .2rem; }
.tienda { opacity: .85; font-weight: 400; font-size: .85rem; margin-left: .4rem; }

/* Cíclicos */
.progreso { height: 8px; background: var(--borde); border-radius: 99px; overflow: hidden; margin: .35rem 0; }
.progreso i { display: block; height: 100%; background: var(--marca); }
.num { font-variant-numeric: tabular-nums; }
.linea-c { display: grid; grid-template-columns: 1fr auto; gap: .2rem .6rem; align-items: center; }
.linea-c .cifras { display: flex; gap: .7rem; font-size: .85rem; color: var(--suave); }
.linea-c .cifras b { color: var(--texto); }
.linea-c .contar { display: flex; gap: .3rem; }
.linea-c .contar button { min-width: 44px; padding: .2rem .5rem; font-weight: 700; }
.dif-pos { color: var(--alerta); } .dif-neg { color: var(--mal); } .dif-cero { color: var(--ok); }
.chips { display: flex; flex-wrap: wrap; gap: .3rem; margin: .4rem 0; }
.chip.neutro { color: var(--suave); }
textarea { width: 100%; min-height: 7rem; padding: .6rem; border: 1px solid var(--borde); border-radius: 10px; background: var(--superficie); color: var(--texto); font: inherit; }
select { font: inherit; color: var(--texto); background: var(--superficie); border: 1px solid var(--borde); border-radius: 10px; padding: .45rem .5rem; min-height: 40px; }
.tabla { width: 100%; border-collapse: collapse; font-size: .85rem; }
.tabla th, .tabla td { border-bottom: 1px solid var(--borde); padding: .35rem .3rem; text-align: left; }
.tabla td.n, .tabla th.n { text-align: right; font-variant-numeric: tabular-nums; }

@media print {
  body.imprimiendo #app, body.imprimiendo .aviso, body.imprimiendo .no-imprimir, body.imprimiendo .dlg header { display: none !important; }
  body.imprimiendo .dlg { position: static; max-height: none; overflow: visible; background: #fff; color: #000; }
  body.imprimiendo .dlg::backdrop { background: none; }
}
#q-ciclico { flex: 1 1 100%; }

/* v0.5.1: listas que no aplastan el texto. Si las acciones no caben al lado, bajan a su propia fila. */
.item { flex-wrap: wrap; }
.item > div:first-child { flex: 1 1 11rem; }
.item > .acciones { flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.item > .der { margin-left: auto; }
.linea-c { grid-template-columns: minmax(0, 1fr) auto; }
.linea-c .cifras { flex-wrap: wrap; gap: .2rem .7rem; }
.kpi small { overflow-wrap: anywhere; }
.dlg { overflow-x: hidden; }
.tabla td small { display: block; }
.item > .acciones { flex-shrink: 1; max-width: 100%; }
.acciones select { max-width: 100%; }

/* Promociones del encarte (v0.6) */
.promo-tag { color: var(--alerta); font-weight: 600; }
button.promo-boton { border: 2px solid var(--alerta); color: var(--texto); font-weight: 600; text-align: left; margin: 0 0 .6rem; overflow-wrap: anywhere; }
.tarjeta.promo { border-left: 4px solid var(--alerta); }
.promo-cab { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; }
.promo-cab h3 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.promo-precio { font-weight: 700; white-space: nowrap; color: var(--marca); }
.promo-precio s { display: block; color: var(--suave); font-weight: 400; font-size: .8rem; text-align: right; }
.promo-grupo { border-top: 1px solid var(--borde); margin-top: .6rem; padding-top: .4rem; }
.promo-grupo > p { margin: .2rem 0; }
.promo-grupo.rol-amarre b, .promo-grupo.rol-incluye b { color: var(--marca); }
.promo-grupo.rol-cambio b { color: var(--alerta); }
.promo-grupo details summary { color: var(--suave); cursor: pointer; font-size: .88rem; }
.item.actual { outline: 2px solid var(--marca); }
.sin-stock { color: var(--mal); }
.promo-falta { margin: .4rem 0; padding: .45rem .7rem; border-radius: 10px; background: color-mix(in srgb, var(--alerta) 16%, transparent); color: var(--texto); font-size: .9rem; }

/* Foto dentro de la app (v0.6.1) */
.dlg-foto { background: #000; }
.capa-foto .foto-marco { flex: 1; min-height: 0; position: relative; display: flex; }
.capa-foto .foto-video { flex: 1; min-height: 0; width: 100%; object-fit: contain; background: #000; }
.capa-foto .foto-guia { position: absolute; inset: 6% 8%; border: 2px dashed rgba(255,255,255,.55); border-radius: 8px; pointer-events: none; }
.capa-foto .foto-ctl { align-items: center; }
.capa-foto .foto-ctl input[type=range] { flex: 1; }
.capa-foto #f-luz.on { background: #f5c542; color: #000; }
.capa-foto #foto-msg.mal { color: #ff8a7d; }

/* v0.8: fotos de producto (tambo.pe o del admin) y miniaturas de fotos */
.ico-prod { flex: none; width: 44px; height: 44px; border-radius: 8px; object-fit: contain; background: #fff; border: 1px solid var(--borde); }
.ico-prod.vacio { background: var(--fondo); border-style: dashed; opacity: .5; }
.ico-prod.chico { width: 26px; height: 26px; border-radius: 5px; vertical-align: middle; margin-right: .35rem; display: inline-block; }
.lineas .ico-prod.chico.vacio { display: none; }
.lineas li { display: flex; align-items: center; flex-wrap: wrap; gap: 0 .3rem; }
.lineas li .icono { min-height: 32px; min-width: 36px; margin-left: auto; }
.foto-prod { display: block; max-width: 100%; max-height: 200px; margin: .3rem auto .6rem; object-fit: contain; background: #fff; border-radius: var(--radio); }
button.mini { flex: none; padding: 0; min-height: 0; border: 0; background: none; border-radius: 8px; overflow: hidden; }
.miniatura { display: block; width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--fondo); border: 1px solid var(--borde); }
.miniatura.sin { opacity: .35; }
.fotos .miniatura { width: 84px; height: 84px; }
.fotos button.mini { min-height: 0; padding: 0; }
.con-ico { display: flex; gap: .6rem; align-items: center; min-width: 0; }
.con-ico > div { min-width: 0; }
tr.tocable { cursor: pointer; }
/* v0.10: listas de escaneo, códigos para la caja, compartir */
textarea.texto-compartir { width: 100%; font: .9rem/1.35 ui-monospace, Consolas, monospace; padding: .6rem; border: 1px solid var(--borde); border-radius: 10px; background: var(--superficie); color: var(--texto); }
a.boton { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .6rem .9rem; border-radius: 10px; border: 1px solid var(--borde); text-decoration: none; color: inherit; font-weight: 600; }
a.boton.whatsapp, button.whatsapp { background: #25d366; border-color: #25d366; color: #fff; }
.item .contar { display: flex; align-items: center; gap: .3rem; flex: none; }
.item .contar button { min-width: 40px; padding: .2rem .4rem; font-weight: 700; }
.item .contar b { min-width: 1.6rem; text-align: center; }
/* Pantalla para la caja: siempre clara (también en modo oscuro), para que el lector lea bien. */
.dlg-codigos { --fondo: #fff; --superficie: #fff; --texto: #111; --suave: #555; --borde: #d6dbd7; color-scheme: light; background: #fff; color: #111; }
.codigo-caja { background: #fff; color: #000; text-align: center; padding: 1rem .5rem 1.2rem; border-bottom: 1px dashed #bbb; }
.codigo-caja svg.barras { display: block; width: 100%; max-width: 420px; height: 110px; margin: 0 auto .3rem; }
.codigo-caja b { display: block; font: 600 1.1rem ui-monospace, Consolas, monospace; letter-spacing: .08em; }
.codigo-caja small { color: #444; }
.foto-mini { position: relative; display: inline-block; }
.foto-mini .quitar-foto { position: absolute; top: -6px; right: -6px; min-height: 0; width: 26px; height: 26px; padding: 0; border-radius: 50%; background: var(--mal); color: #fff; border: 2px solid var(--superficie); font-size: .8rem; line-height: 1; }
label select { width: 100%; padding: .6rem .75rem; border: 1px solid var(--borde); border-radius: 10px; background: var(--superficie); color: var(--texto); min-height: 44px; font: inherit; margin-top: .25rem; }
.item:has(> .ico-prod), .item:has(> button.mini) { flex-wrap: nowrap; }
.item:has(> .ico-prod) > div:first-of-type, .item:has(> button.mini) > div:first-of-type { flex: 1 1 auto; min-width: 0; }

/* Promos del día (v0.13): fin de semana, Kikirikí… destacadas en Inicio */
.tarjeta.promos-dia { border-left: 4px solid var(--alerta); }
.tarjeta.promos-dia .item { cursor: pointer; }
.tarjeta.promos-dia details.proximas { margin-top: .6rem; }
.tarjeta.promos-dia details.proximas summary { cursor: pointer; color: var(--suave); }
.tarjeta.promos-dia h3.grupo small { color: var(--suave); font-weight: 400; }

/* Horario y labores (v0.14) */
.semana { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: .4rem 0; }
.semana .dia { border: 1px solid var(--borde); border-radius: 8px; padding: .3rem .15rem; text-align: center; font-size: .72rem; line-height: 1.2; }
.semana .dia b { display: block; font-weight: 600; word-break: break-word; }
.semana .dia.hoy { border-color: var(--marca); box-shadow: inset 0 0 0 1px var(--marca); }
.semana .dia.libre, .cuadro td.libre { background: var(--pend); }
.desc { color: var(--mal); font-weight: 700; }
.cuadro-scroll { overflow-x: auto; margin: .4rem 0; }
.cuadro { border-collapse: collapse; font-size: .78rem; min-width: 560px; width: 100%; }
.cuadro th, .cuadro td { border: 1px solid var(--borde); padding: .3rem .25rem; text-align: center; white-space: nowrap; }
.cuadro tbody th { text-align: left; }
.cuadro tbody th small { display: inline; margin-left: .3rem; }
.cuadro .hoy { outline: 2px solid var(--marca); outline-offset: -2px; }
.cuadro tr.yo th, .cuadro tr.yo td { font-weight: 700; color: var(--marca); }
.labor .check { min-height: 36px; min-width: 40px; padding: .2rem; font-size: 1.1rem; background: none; border: none; display: inline-flex; align-items: center; justify-content: center; }
.labor.hecha b { text-decoration: line-through; color: var(--suave); }

/* Conteo de dinero (v0.16) */
.lista.dinero .den { display: grid; grid-template-columns: 4.6rem auto 1fr; align-items: center; gap: .5rem; padding: .3rem 0; }
.den-nom { white-space: nowrap; }
.den-ctl { display: inline-flex; align-items: center; gap: .25rem; }
.den-ctl button { min-width: 44px; min-height: 44px; padding: 0; font-size: 1.2rem; }
.den-ctl input { width: 4.2rem; text-align: center; font-size: 1.05rem; padding: .35rem .2rem; }
.den-sub { text-align: right; color: var(--suave); font-variant-numeric: tabular-nums; }
.total-dinero { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 4; display: flex; justify-content: space-between; align-items: center; gap: .6rem;
  background: var(--superficie); border: 2px solid var(--marca); border-radius: 12px; padding: .5rem .8rem; margin: .6rem 0; }
.total-dinero b { display: block; font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.total-dinero small { display: block; color: var(--suave); }
.cruce { color: var(--alerta, #e0a030); }
/* 0.45: barra del cíclico (lo último que añadiste → historial) */
.barra-conteo { width: 100%; text-align: left; font: inherit; color: var(--texto); cursor: pointer; }
.barra-conteo > div { min-width: 0; flex: 1; }
.barra-conteo b { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barra-conteo .chip { flex: none; }
.alarmas .fila { align-items: center; justify-content: space-between; }
.alarmas label.check { white-space: nowrap; flex: 1; color: var(--texto); font-size: 1rem; }
.alarmas input[type=checkbox] { width: 1.4rem; height: 1.4rem; min-height: 0; flex: none; margin: 0; }
.alarmas select { flex: 0 0 auto; width: auto; }

/* Sin desplazamiento horizontal (v0.17): la página solo se mueve hacia arriba y abajo. Las tablas anchas
   (cuadro del horario, puntaje) siguen deslizándose dentro de su caja. */
html, body { overflow-x: clip; max-width: 100%; overscroll-behavior-x: none; }
body { touch-action: pan-y pinch-zoom; }
.cuadro-scroll, [style*="overflow-x:auto"] { touch-action: pan-x pan-y; overscroll-behavior-x: contain; }
#app, main { overflow-x: clip; }

/* Inicio en paneles (v0.17) */
.hero { position: relative; overflow: hidden; margin: .4rem 0 .6rem; padding: 1rem 1rem .9rem; border-radius: 18px; color: #fff;
  background: radial-gradient(circle at 110% -20%, rgba(255,255,255,.22) 0 35%, transparent 36%), linear-gradient(135deg, #1f7a4d, #145236); }
.hero h2 { margin: .1rem 0 .5rem; font-size: 1.35rem; }
.hero-fecha { opacity: .85; display: block; }
.hero-fecha::first-letter { text-transform: uppercase; }
.panel .kpis { grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); }
.panel .kpi b { font-size: 1.3rem; }
.hero-turno { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; flex-wrap: wrap; font-size: .9rem; }
.hero-turno b { font-variant-numeric: tabular-nums; }
.hero .progreso { background: rgba(255,255,255,.25); margin: .45rem 0 .2rem; }
.hero .progreso i { background: #fff; }
.accesos { display: grid; grid-template-columns: repeat(4, 1fr); gap: .45rem; margin-top: .8rem; }
.acceso { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .55rem .2rem; min-height: 0; border: none; border-radius: 12px;
  background: rgba(255,255,255,.16); color: #fff; font-size: .8rem; font-weight: 600; transition: transform .12s, background .12s; }
.acceso span { font-size: 1.4rem; line-height: 1.1; }
.acceso:active { transform: scale(.94); background: rgba(255,255,255,.28); }
.avisos-inicio { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .5rem; }
.aviso-chip { border: 1px solid var(--borde); background: var(--superficie); border-radius: 999px; padding: .35rem .75rem; min-height: 36px; font-size: .85rem; font-weight: 600; }
.aviso-chip.alerta { border-color: var(--alerta); color: var(--alerta); }
.aviso-chip.mal { border-color: var(--mal); color: var(--mal); }
.aviso-chip.ok { border-color: var(--ok); color: var(--ok); display: inline-flex; align-items: center; }
.panel { background: var(--superficie); border: 1px solid var(--borde); border-radius: 16px; margin: .55rem 0; overflow: hidden; transition: box-shadow .2s; }
.panel[open] { box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.panel > summary { list-style: none; display: flex; align-items: center; gap: .7rem; padding: .7rem .9rem; cursor: pointer; min-height: 56px; user-select: none; -webkit-tap-highlight-color: transparent; }
.panel > summary::-webkit-details-marker { display: none; }
.panel > summary:active { background: var(--fondo); }
.panel-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.25rem; background: var(--fondo); }
.panel-ico.verde { background: rgba(31,122,77,.15); } .panel-ico.rojo { background: rgba(192,57,43,.15); } .panel-ico.azul { background: rgba(41,121,255,.14); }
.panel-ico.naranja { background: rgba(240,140,30,.17); } .panel-ico.amarillo { background: rgba(240,190,30,.2); } .panel-ico.gris { background: rgba(127,127,127,.15); }
.panel-tit { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.panel-tit small { color: var(--suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-flecha { flex: none; font-size: 1.5rem; color: var(--suave); transition: transform .2s; line-height: 1; }
.panel[open] > summary .panel-flecha { transform: rotate(90deg); }
.panel-cuerpo { padding: 0 .9rem .8rem; animation: aparecer .22s ease-out; }
@keyframes aparecer { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.progreso { height: 8px; border-radius: 99px; background: var(--borde); overflow: hidden; margin: .4rem 0; }
.progreso i { display: block; height: 100%; border-radius: 99px; background: var(--alerta); transition: width .4s; }
.progreso.ok i { background: var(--ok); }
.barra-venc { display: flex; height: 10px; border-radius: 99px; overflow: hidden; gap: 2px; margin: .2rem 0 .5rem; }
.barra-venc i { display: block; } .barra-venc .mal { background: var(--mal); } .barra-venc .alerta { background: var(--alerta); }
.barra-venc .medio { background: #e0c040; } .barra-venc .suave { background: var(--borde); }
.meta-fila { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-top: .4rem; }
.meta-fila b { font-size: 1.25rem; font-variant-numeric: tabular-nums; } .meta-fila small { color: var(--suave); }
.panel .kpi { transition: transform .12s; } .panel .kpi:active { transform: scale(.96); }
@media (prefers-reduced-motion: reduce) { .panel-cuerpo { animation: none; } .panel-flecha, .acceso, .progreso i { transition: none; } }

/* v0.18.5: cortina mientras se actualiza */
.cortina { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: rgba(12, 18, 14, .92); color: #fff; text-align: center; padding: 16px; font-size: 1.15rem; font-weight: 600; }
.cortina-giro { width: 44px; height: 44px; margin: 0 auto 1rem; border: 4px solid rgba(255,255,255,.25); border-top-color: #3fae6a; border-radius: 50%; animation: cortina-giro .9s linear infinite; }
@keyframes cortina-giro { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cortina-giro { animation: none; } }

/* v0.18.8: que la barra fija no tape el campo enfocado */
#vista input, #vista textarea { scroll-margin-bottom: 170px; scroll-margin-top: 80px; }

/* v0.18.9: lo que hay que sacar YA del anaquel */
.item.retirar-ya { border-left: 5px solid var(--mal, #c0392b); background: color-mix(in srgb, var(--mal, #c0392b) 12%, transparent); border-radius: 8px; }
h3.grupo.retirar-ya { color: var(--mal, #c0392b); }

/* ===== v0.19: todas las pantallas con el estilo del dashboard (pedido de Pierre) ===== */
.hero-vista { padding: .9rem 1rem .85rem; }
.hero-vista.tono-verde   { background: radial-gradient(circle at 110% -20%, rgba(255,255,255,.22) 0 35%, transparent 36%), linear-gradient(135deg, #1f7a4d, #145236); }
.hero-vista.tono-rojo    { background: radial-gradient(circle at 110% -20%, rgba(255,255,255,.2) 0 35%, transparent 36%), linear-gradient(135deg, #c0392b, #7d2018); }
.hero-vista.tono-naranja { background: radial-gradient(circle at 110% -20%, rgba(255,255,255,.2) 0 35%, transparent 36%), linear-gradient(135deg, #d9771a, #8f4708); }
.hero-vista.tono-azul    { background: radial-gradient(circle at 110% -20%, rgba(255,255,255,.2) 0 35%, transparent 36%), linear-gradient(135deg, #2f6fdb, #1b3f86); }
.hero-vista.tono-morado  { background: radial-gradient(circle at 110% -20%, rgba(255,255,255,.2) 0 35%, transparent 36%), linear-gradient(135deg, #7b3fc4, #47217a); }
.hero-vista.tono-ambar   { background: radial-gradient(circle at 110% -20%, rgba(255,255,255,.22) 0 35%, transparent 36%), linear-gradient(135deg, #c99410, #7a5806); }
.hero-vista.tono-gris    { background: radial-gradient(circle at 110% -20%, rgba(255,255,255,.18) 0 35%, transparent 36%), linear-gradient(135deg, #4a5a50, #2a332e); }
.hv-cab { display: flex; align-items: center; gap: .7rem; }
.hv-cab h2 { margin: 0; font-size: 1.3rem; }
.hero small, .hero-vista small { color: inherit; } /* 0.23.5: el gris global no se leía sobre el color del hero */
.hv-cab small { display: block; opacity: .9; overflow-wrap: anywhere; }
.hv-ico { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: rgba(255,255,255,.18); }
.hv-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: .4rem; margin-top: .75rem; }
.hv-kpi { background: rgba(255,255,255,.15); border: none; color: #fff; border-radius: 12px; padding: .45rem .55rem; text-align: left; min-height: 0; display: block; width: 100%; }
.hv-kpi b { display: block; font-size: 1.3rem; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hv-kpi small { font-size: .74rem; opacity: .92; }
.hv-kpi.mal { background: rgba(255,255,255,.95); color: #b02a1e; }
.hv-kpi.alerta { background: rgba(255,236,190,.95); color: #7a4600; }
.hero-vista .progreso { background: rgba(255,255,255,.25); margin: .6rem 0 0; }
.hero-vista .progreso i { background: #fff; }

/* Tarjetas, grupos e ítems con el mismo acabado que los paneles */
.tarjeta { border-radius: 16px; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.item { border-radius: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.04); transition: transform .12s, box-shadow .15s; }
.item[data-acc]:active, .item[data-sku]:active { transform: scale(.985); }
h3.grupo { font-size: .95rem; margin: 1.1rem 0 .3rem; padding-left: .55rem; border-left: 4px solid var(--marca); }
h3.grupo.retirar-ya { border-left-color: var(--mal); }
.pill { background: var(--marca); color: #fff; font-weight: 700; }
h3.grupo.retirar-ya .pill { background: var(--mal); }
#vista.entrando .lista > .item { animation: entrar .25s ease-out both; }
#vista.entrando .lista > .item:nth-child(2) { animation-delay: .03s; } #vista.entrando .lista > .item:nth-child(3) { animation-delay: .06s; }
#vista.entrando .lista > .item:nth-child(4) { animation-delay: .09s; } #vista.entrando .lista > .item:nth-child(5) { animation-delay: .12s; }
@keyframes entrar { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#vista.entrando .hero-vista { animation: entrar .25s ease-out both; }
@media (prefers-reduced-motion: reduce) { #vista .lista > .item, .hero-vista, .item { animation: none; transition: none; } }

/* v0.20: sección Promos */
.chips-promo { display: flex; gap: .35rem; overflow-x: auto; padding: .3rem 0; scrollbar-width: none; align-items: center; }
.chips-promo::-webkit-scrollbar { display: none; }
.chips-promo.pago small { color: var(--suave); white-space: nowrap; margin-right: .2rem; }
.chip-filtro { white-space: nowrap; border-radius: 99px; padding: .3rem .75rem; min-height: 36px; font-size: .88rem; }
.chip-filtro i { font-style: normal; color: var(--suave); font-size: .78rem; margin-left: .15rem; }
.chip-filtro.on { background: var(--alerta); border-color: var(--alerta); color: #fff; }
.chip-filtro.on i { color: #fff; }
.promos-buscar .item { cursor: pointer; }
.promo-cat { display: inline-block; font-size: .74rem; border: 1px solid var(--borde); border-radius: 99px; padding: 0 .4rem; margin: .1rem .25rem .1rem 0; }

/* v0.21.1: precio promocional en la ficha del producto */
.ficha-promo { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; margin: .4rem 0 .8rem; padding: .7rem .9rem;
  border-radius: 14px; background: color-mix(in srgb, #e08a1e 16%, transparent); border: 2px solid #e08a1e; }
.ficha-promo-etq { flex-basis: 100%; font-size: .78rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #c26f0a; }
.ficha-promo b { font-size: 1.7rem; color: #c26f0a; }
.ficha-promo s { color: var(--suave); }
.ficha-promo small { flex-basis: 100%; color: var(--suave); }
.ficha-promo.pdm { background: color-mix(in srgb, #1f8a4c 14%, transparent); border-color: #1f8a4c; }
.ficha-promo.pdm .ficha-promo-etq, .ficha-promo.pdm b { color: #1f8a4c; }

/* v0.21.3: tarjetas del panel «Promos del día», un color por tipo */
.pd-bloque { --pd: #e08a1e; margin: .6rem 0 1rem; }
.pd-bloque.kiki { --pd: #4caf50; } .pd-bloque.diaria { --pd: #f08a24; } .pd-bloque.finde { --pd: #8e5bd6; } .pd-bloque.corta { --pd: #1ca3a3; } .pd-bloque.horario { --pd: #e0a800; }
.pd-cab { display: flex; align-items: center; gap: .4rem; margin: 0 0 .5rem; font-size: 1rem; color: var(--pd); }
.pd-cab > span:first-child { font-size: 1.3rem; }
.pd-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .55rem; }
.pd-card { --pd: #e08a1e; position: relative; display: flex; flex-direction: column; gap: .25rem; padding: .75rem .8rem .7rem; cursor: pointer;
  border-radius: 16px; border: 1.5px solid color-mix(in srgb, var(--pd) 55%, transparent);
  background: linear-gradient(155deg, color-mix(in srgb, var(--pd) 30%, transparent), color-mix(in srgb, var(--pd) 8%, transparent));
  box-shadow: 0 2px 10px color-mix(in srgb, var(--pd) 18%, transparent); transition: transform .12s ease; }
.pd-card:active { transform: scale(.97); }
.pd-card.kiki { --pd: #4caf50; } .pd-card.diaria { --pd: #f08a24; } .pd-card.finde { --pd: #8e5bd6; } .pd-card.corta { --pd: #1ca3a3; } .pd-card.horario { --pd: #e0a800; }
.pd-card.fuera { opacity: .55; } /* 0.58: promo por horario fuera de su franja */
.pd-nombre { font-size: .9rem; line-height: 1.2; }
.pd-oferta { font-size: 1.35rem; font-weight: 800; line-height: 1.1; color: color-mix(in srgb, var(--pd) 80%, var(--texto, #fff)); }
.pd-oferta.larga { font-size: 1rem; }
.pd-antes { font-size: .74rem; color: var(--suave); white-space: nowrap; }
.pd-card small { color: var(--suave); font-size: .74rem; line-height: 1.25; }
.proximas .pd-grid { margin-top: .5rem; opacity: .85; }

/* v0.22: remesas y flujo */
.ef-alertas { list-style: none; margin: .3rem 0 .6rem; padding: 0; display: grid; gap: .4rem; }
.ef-alerta { display: flex; flex-direction: column; gap: .1rem; padding: .55rem .7rem; border-radius: 12px;
  border: 1.5px solid color-mix(in srgb, var(--mal, #d9473a) 60%, transparent); background: color-mix(in srgb, var(--mal, #d9473a) 12%, transparent); }
.ef-alerta small { color: var(--suave); }
.ef-dia { margin: .8rem 0; padding-top: .4rem; border-top: 1px solid var(--borde); }
.ef-dia h3 { margin: 0 0 .4rem; display: flex; justify-content: space-between; align-items: baseline; }
.ef-dia h3 small { color: var(--suave); font-weight: 400; }
.ef-cierre { margin: .2rem 0 .5rem; padding: .45rem .6rem; border-radius: 10px; background: color-mix(in srgb, #8e5bd6 15%, transparent); font-weight: 600; }
.ef-persona { margin: .35rem 0 .6rem; display: flex; flex-direction: column; gap: .3rem; }
.ef-sobres { display: flex; flex-wrap: wrap; gap: .35rem; }
.ef-sobre { display: inline-flex; flex-direction: column; padding: .35rem .55rem; border-radius: 10px; font-weight: 700;
  background: color-mix(in srgb, var(--marca) 14%, transparent); border: 1px solid color-mix(in srgb, var(--marca) 40%, transparent); }
.ef-sobre small { font-weight: 400; font-size: .7rem; color: var(--suave); }
.ef-flujo { font-size: .85rem; color: var(--suave); }
.ef-sobre.mal, .ef-flujo.mal { color: var(--mal, #d9473a); border-color: var(--mal, #d9473a); background: color-mix(in srgb, var(--mal, #d9473a) 12%, transparent); }
.ef-flujo.mal { padding: .3rem .5rem; border-radius: 8px; border: 1px solid; }
.ef-tabla { width: 100%; border-collapse: collapse; font-size: .85rem; margin: .4rem 0; }
.ef-tabla th, .ef-tabla td { padding: .35rem .4rem; text-align: right; border-bottom: 1px solid var(--borde); white-space: nowrap; }
.ef-tabla th:first-child, .ef-tabla td:first-child { text-align: left; }
.ef-tabla td.mal { color: var(--mal, #d9473a); font-weight: 700; }
.tabla-scroll { overflow-x: auto; }

/* v0.22.3: los KPI no se desbordan con números largos */
.kpi { min-width: 0; overflow: hidden; }
.kpi b { white-space: nowrap; }
.kpi.largo b { font-size: 1.05rem; }
.kpi.muy-largo b { font-size: .9rem; }

/* v0.22.4: tarjetas del puntaje */
.pt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; margin: .5rem 0; }
.pt-card { display: flex; flex-direction: column; gap: .15rem; padding: .65rem .75rem; border-radius: 14px; min-width: 0;
  background: var(--superficie); border: 1px solid var(--borde); }
.pt-card.ancho { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: .1rem .7rem; }
.pt-card.ancho .pt-etq { flex-basis: 100%; }
.pt-etq { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--suave); }
.pt-valor { font-size: 1.5rem; line-height: 1.1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pt-card.ancho .pt-valor { font-size: 1.9rem; }
.pt-card.ok .pt-valor { color: var(--ok, #2e9d5b); }
.pt-card small { color: var(--suave); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ef-fechas { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: .4rem; align-items: end; margin: .4rem 0; }
.ef-fechas label { display: flex; flex-direction: column; gap: .15rem; font-size: .8rem; color: var(--suave); min-width: 0; }
.ef-fechas input { width: 100%; min-width: 0; }
select.ancho { width: 100%; max-width: 100%; box-sizing: border-box; }

/* v0.23: reporte diario */
.rd-nav { display: grid; grid-template-columns: auto 1fr auto; gap: .4rem; align-items: center; }
.rd-nav button { min-width: 2.8rem; font-size: 1.3rem; }
.rd-nav input { width: 100%; min-width: 0; }
.rd-dia { margin: .3rem 0 .2rem; text-transform: capitalize; font-weight: 700; color: var(--suave); }
.rd-tabla td, .rd-tabla th { padding: .35rem .3rem; }
.pt-card small b.ok { color: var(--ok, #2e9d5b); } .pt-card small b.mal { color: var(--mal, #d9473a); }

/* v0.23: semáforo de metas y pantalla de metas */
.pt-card.alerta .pt-valor { color: var(--alerta, #e0a020); } .pt-card.mal .pt-valor { color: var(--mal, #d9473a); }
.pt-card.ok { border-color: color-mix(in srgb, var(--ok, #2e9d5b) 45%, var(--borde)); }
.pt-card.alerta { border-color: color-mix(in srgb, var(--alerta, #e0a020) 55%, var(--borde)); }
.pt-card.mal { border-color: color-mix(in srgb, var(--mal, #d9473a) 55%, var(--borde)); }
.meta-fila b.ok { color: var(--ok, #2e9d5b); } .meta-fila b.alerta { color: var(--alerta, #e0a020); } .meta-fila b.mal { color: var(--mal, #d9473a); }
.ef-tabla td.ok { color: var(--ok, #2e9d5b); font-weight: 700; } .ef-tabla td.alerta { color: var(--alerta, #e0a020); font-weight: 700; }
.rd-turno { display: block; font-size: .7rem; }
.mt-ind { margin: .7rem 0; } .mt-ind h3 { margin: 0 0 .35rem; } .mt-ind h3 small { color: var(--suave); font-weight: 400; }
.mt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
.mt-celda { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; padding: .45rem; border: 1px solid var(--borde); border-radius: 12px; }
.mt-celda span { grid-column: 1 / -1; font-size: .78rem; font-weight: 700; color: var(--suave); }
.mt-celda input { width: 100%; min-width: 0; }
button.pt-card { text-align: left; cursor: pointer; font: inherit; color: inherit; width: 100%; }
.botonera { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; margin-top: .4rem; }
.botonera button { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .55rem .3rem; font-size: 1.2rem; }
.botonera button span { font-size: .78rem; }
.mt-celda label { display: flex; flex-direction: column; gap: .1rem; font-size: .7rem; color: var(--suave); min-width: 0; }
.ef-tabla td.n.mal, .tabla td.n.mal { color: var(--mal, #d9473a); } .tabla td.n.alerta { color: var(--alerta, #e0a020); } .tabla td.n.ok { color: var(--ok, #2e9d5b); }
.pt-card.ancho small { white-space: normal; }

/* 0.23.6: sesiones abiertas de cada persona */
.sesion { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .35rem; padding: .3rem .5rem; border-radius: 10px; background: color-mix(in srgb, var(--borde) 40%, transparent); font-size: .9rem; }
.sesion small { display: block; }
.sesion .icono { min-height: 36px; padding: .2rem .6rem; }

/* 0.23.7: insignia del turno del cuadro */
.insignia-turno { display: inline-block; vertical-align: middle; margin-left: .35rem; padding: .05rem .5rem; border-radius: 99px; font-size: .75rem; font-weight: 700; color: #fff; background: #4a5a50; }
.insignia-turno.t-t1 { background: #d9771a; } .insignia-turno.t-t2 { background: #2f6fdb; } .insignia-turno.t-t3 { background: #47217a; } .insignia-turno.t-tr { background: #1f7a4d; }

/* ---------- zonas y tareas (v0.26.0) ---------- */
.plano { position: relative; width: 100%; max-width: 520px; margin: .6rem auto; border-radius: var(--radio); overflow: hidden; border: 1px solid var(--borde); background: #fff; }
.plano img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.zona-btn { position: absolute; min-height: 0; padding: 0; border-radius: 6px; border: 2px solid; background: color-mix(in srgb, currentColor 14%, transparent); display: flex; align-items: center; justify-content: center; }
.zona-btn i { font-style: normal; font-weight: 800; font-size: .72rem; background: currentColor; border-radius: 99px; min-width: 1.35rem; height: 1.35rem; display: inline-flex; align-items: center; justify-content: center; }
.zona-btn i { color: #fff; text-shadow: 0 0 2px #000; }
.z-productos { color: #1f7a4d; } .z-almacen { color: #6b5b95; } .z-otra { color: #7a8580; }
.zona-btn.libre { border-style: dashed; }
.zona-btn.mia { color: #e67e00; border-width: 3px; background: color-mix(in srgb, #e67e00 22%, transparent); }
.zona-btn.apagada { opacity: .18; }
.leyenda { display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: center; font-size: .8rem; color: var(--suave); }
.leyenda span { display: inline-block; width: .9rem; height: .9rem; border-radius: 3px; border: 2px solid; vertical-align: -2px; margin-right: .2rem; }
.leyenda span.mia { color: #e67e00; } .leyenda span.libre { border-style: dashed; color: var(--suave); }
.zona-n { flex: none; min-width: 2rem; height: 2rem; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; border: 2px solid; }
.item.mia { border-left: 4px solid #e67e00; }
.lista.compacta li { padding: .2rem 0; font-size: .88rem; display: block; }
.lista.compacta small { display: inline; }
details summary small { display: inline; }
.tarea.urgente { border-left: 5px solid var(--mal); }
.tarea.completa { opacity: .75; }
.tarea .meta { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .85rem; color: var(--suave); margin: .2rem 0 .4rem; }
.tarea .meta button.enlace { font-size: .85rem; }
.notas .miniatura { width: 56px; height: 56px; }
.form-tarea textarea, .form-tarea select, #f-asignar select { width: 100%; padding: .6rem .7rem; border: 1px solid var(--borde); border-radius: 10px; background: var(--superficie); color: var(--texto); font: inherit; margin-top: .25rem; }
#f-asignar select { flex: 1; margin: 0; min-height: 44px; }
.form-tarea .seg label { margin: 0; display: inline-flex; gap: .3rem; align-items: center; color: var(--texto); }
.form-tarea .seg input, .check-linea input { width: auto; min-height: 0; margin: 0; }
.check-linea { display: flex; gap: .5rem; align-items: center; color: var(--texto); }
h2.seccion-zona { margin: .9rem 0 .2rem; font-size: 1.05rem; }
.item.de-mi-zona { box-shadow: inset 4px 0 0 #e67e00; }
.item .zona-n + div { flex: 1; text-align: left; min-width: 0; }
.tarea .lista .item > div, .lista.notas .item > div { flex: 1; text-align: left; }
.form-tarea .seg label { padding: .45rem .8rem; gap: .4rem; }

/* v0.26.1: plano en SVG, una zona por mueble */
.plano svg { display: block; width: 100%; height: auto; }
.plano { aspect-ratio: auto; background: #fbfaf7; }
.plano .muro { fill: #fff; stroke: #2a2f2c; stroke-width: .35; stroke-linejoin: round; }
.plano .entrada { stroke: #1f9d55; stroke-width: .7; }
.plano .rotulo { font-size: .95px; font-weight: 700; fill: #1f7a4d; text-anchor: middle; letter-spacing: .05px; }
.plano .rotulo.calle { fill: #444; font-size: 1.15px; }
.plano .zona { cursor: pointer; }
.plano .zona rect { stroke-width: .2; fill-opacity: .85; }
.plano .zona text { text-anchor: middle; dominant-baseline: central; font-weight: 800; fill: #fff; paint-order: stroke; stroke: rgba(0,0,0,.45); stroke-width: .12px; pointer-events: none; }
.plano .zona.libre rect { stroke-dasharray: .45 .3; }
.plano .zona.mia rect { stroke: #e67e00; stroke-width: .55; }
.plano .zona.apagada { opacity: .15; }
.t-gondola { --c: #2e8b57; } .t-cabecera { --c: #14806f; } .t-frio { --c: #2f7fc1; } .t-caliente { --c: #d0563f; }
.t-helados { --c: #8e5bbf; } .t-counter { --c: #c08a1a; } .t-almacen { --c: #7d7a8c; } .t-servicio { --c: #a3aaa6; }
.plano .zona rect { fill: var(--c); stroke: color-mix(in srgb, var(--c) 60%, #000); }
.zona-n[class*="t-"] { color: var(--c); }
.cuadrito { display: inline-block; width: .85rem; height: .85rem; border-radius: 3px; vertical-align: -2px; margin: 0 .15rem 0 .4rem; background: var(--c, transparent); border: 2px solid transparent; }
.cuadrito.mia { border-color: #e67e00; } .cuadrito.libre { border: 2px dashed var(--suave); }
.laminas { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem; }
.laminas figure { margin: 0; }
.laminas .lamina { padding: 0; width: 100%; min-height: 120px; background: #fff; overflow: hidden; }
.laminas img { width: 100%; display: block; }
.laminas figcaption { font-size: .78rem; color: var(--suave); margin-top: .2rem; }
.laminas figure.sin .lamina::after { content: 'sin red'; color: var(--suave); }
.lamina-grande { overflow: auto; max-height: 75vh; background: #fff; border-radius: 8px; }
.lamina-grande img { width: 100%; display: block; }
.lamina-grande.zoom img { width: 250%; max-width: none; }
.leyenda .cuadrito { background: var(--c, transparent); border: 2px solid var(--c, transparent); } .leyenda .cuadrito.mia { background: none; border-color: #e67e00; } .leyenda .cuadrito.libre { background: none; border: 2px dashed var(--suave); }
.t-exterior { --c: #b9c0bb; } .plano .zona.t-exterior text { fill: #333; stroke: none; }

/* v0.29 recepción: chip sin cortarse, reportes por caja */
.chip { white-space: nowrap; }
.caja-rec summary { line-height: 1.6; }
.reporte-rec { gap: .5rem; flex-wrap: wrap; }
.reporte-rec p { margin: .2rem 0; }

/* v0.32.0: tareas por turno — faltantes, evidencia por punto y estado en el plano */
.falto { background: color-mix(in srgb, var(--mal) 14%, transparent); border-left: 4px solid var(--mal); border-radius: 10px; padding: .45rem .7rem; margin: .3rem 0 .5rem; font-size: .9rem; cursor: pointer; }
.tarea.faltante { border-left: 5px solid var(--mal); }
.item.labor.falta b, .item.falta b { color: var(--mal); }
.lista.notas.punto { margin: .35rem 0 0; }
.lista.notas.punto .item { padding: .3rem .4rem; min-height: 0; }
.item.labor > .icono { position: relative; margin-left: auto; flex: none; }
.item.labor > .icono .badge { position: absolute; top: -4px; right: -4px; font-size: .65rem; }
#q-tareas { flex: 1; min-width: 0; }
.plano .tz { stroke: #fff; stroke-width: .12; pointer-events: none; }
.plano .tz.falta { fill: var(--mal); } .plano .tz.pend { fill: var(--alerta); } .plano .tz.ok { fill: var(--ok); } .plano .tz.fuera { fill: #8a948f; }
.leyenda-tz .tz-l { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin: 0 .25rem 0 .6rem; vertical-align: middle; }
.tz-l.falta { background: var(--mal); } .tz-l.pend { background: var(--alerta); } .tz-l.ok { background: var(--ok); } .tz-l.fuera { background: #8a948f; }
/* 0.32.1: las pestañas de Tareas ocupan el ancho y nunca se salen de la pantalla */
.seg.seg-tareas { display: flex; width: 100%; }
.seg.seg-tareas button { flex: 1 1 0; min-width: 0; padding-left: .2rem; padding-right: .2rem; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 0.33.0: la evidencia dentro de un punto hecho no sale tachada; botón de WhatsApp por punto */
.labor.hecha .notas b { text-decoration: none; color: var(--texto); }
.item.labor > .icono.wa-punto { color: #25d366; }

.foto-previa { width: 100%; max-height: 50vh; object-fit: contain; border-radius: 8px; background: #000; margin: 8px 0; }

/* 0.40: revisión de hojas de Dinet */
.dlg-ancho { width: min(720px, 100vw); }
.dn-cab { gap: 8px; align-items: end; }
.dn-cab label { flex: 1; }
.dn-cab label:nth-child(2), .dn-cab label:nth-child(3) { flex: 0 0 64px; }
.dn-lista { max-height: 55vh; overflow-y: auto; }
.dn-fila { display: flex; gap: 8px; align-items: center; }
.dn-fila .dn-txt { flex: 1; min-width: 0; }
.dn-fila small { display: block; opacity: .75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dn-fila .dn-cant input { width: 64px; text-align: right; font-size: 1.1em; }
.dn-duda { background: rgba(245, 197, 66, .12); border-left: 3px solid #f5c542; }
.dn-franja { display: block; max-width: 100%; height: auto; margin-top: 4px; border-radius: 4px; background: #fff; }
.barra-indet { height: 4px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--acento, #3aa76d), transparent); background-size: 200% 100%; animation: indet 1.2s linear infinite; }
@keyframes indet { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* 0.55: códigos de barra de la merma para la pistola de caja */
.dlg-codigos .cod-barras { background: #fff; padding: 16px 8px; border-radius: 8px; }
.dlg-codigos .barras { display: block; width: 100%; height: 140px; }
.dlg-codigos .cod-texto { text-align: center; font-size: 1.3em; letter-spacing: .08em; margin: .4em 0; }
.dlg-codigos .cod-veces { text-align: center; font-size: 1.2em; }
.dlg-codigos .cod-nombre { margin: .2em 0 .6em; }

/* 0.57: imagen y código de barras de las promos con código (Yape, Plin, bancos). */
.promo-img { display: block; width: 100%; max-height: 200px; object-fit: cover; border-radius: 10px; margin-bottom: .5rem; }
.promo-mini { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex-shrink: 0; margin-right: .5rem; }
.promo-codigo { background: #fff; color: #000; border-radius: 10px; padding: .6rem .6rem .4rem; margin: .5rem 0; text-align: center; }
.promo-codigo .barras { display: block; width: 100%; height: 70px; }
.promo-codigo b { display: block; font-size: 1.15rem; letter-spacing: .12em; margin-top: .2rem; }
.promo-codigo small { color: #555; }
/* 0.57.2 (Pierre: «que se vea la imagen como icono, para ubicarla más rápido»). */
.item > .promo-mini { width: 64px; height: 64px; margin: 0; background: #fff; }
.item > .promo-mini + div { flex: 1; min-width: 0; }
.pd-img { width: 100%; height: 92px; object-fit: cover; border-radius: 10px; background: #fff; margin-bottom: .2rem; }
