/* Pickup - Centro Agricola. Estilos compartidos por cliente, panel y administracion. */
/* Fuentes servidas desde el propio sitio (licencia SIL OFL): ningun tercero recibe datos del visitante. */
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fuentes/figtree-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fuentes/figtree-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fuentes/figtree-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fuentes/figtree-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fuentes/bricolage-grotesque-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fuentes/bricolage-grotesque-latin-700-normal.woff2') format('woff2'); }

:root {
  /* Superficies */
  --suelo: #EEF4EA; --sup: #FFFFFF; --hundido: #E2EBDD;
  /* Texto */
  --tinta: #0A1F14; --gris: #4A5A50;
  /* Lineas: la primera separa, la segunda delimita controles */
  --linea: #D5E0CF; --linea2: #6E8676;
  /* Marca: verde de hoja para actuar, bosque para el personal y los momentos clave */
  --verde: #0B8040; --verde-osc: #0A5C30; --verde-tinte: #D6F5DF; --bosque: #08291A;
  /* Sol: solo para el momento de recoger y para avisos */
  --ambar: #FFD000; --ambar-tinte: #FFF4C2; --ambar-texto: #5C4300;
  --rojo: #B3261E; --rojo-tinte: #FBE4E1;
  --azul: #1D4ED8; --azul-tinte: #E3EBFD;
  --cuerpo: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --rotulo: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  /* Radios: los controles, las tarjetas y las hojas no comparten el mismo */
  --r-control: 16px; --r-tarjeta: 24px; --r-hoja: 32px;
  --sombra-1: 0 2px 4px rgba(8, 41, 26, .06), 0 8px 24px -8px rgba(8, 41, 26, .18);
  --sombra-2: 0 20px 48px -16px rgba(8, 41, 26, .35);
  color-scheme: light;
  --curva: cubic-bezier(.2, .7, .2, 1);                        /* curva de todas las animaciones */
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; scroll-padding-bottom: 132px; }
body { margin: 0; background: var(--suelo); overflow-wrap: break-word; color: var(--tinta); font-family: var(--cuerpo); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: var(--verde-osc); text-underline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; }
/* Sobre el verde bosque el anillo azul no se distingue: ahi el foco es blanco. */
.barra :focus-visible, .tarjeta.oscura :focus-visible, .columna-titulo.azul :focus-visible { outline-color: #fff; }
[hidden] { display: none !important; }

/* Titulos: sin mayusculas forzadas, con la forma de la letra haciendo el trabajo */
.rotulo { font-family: var(--rotulo); font-weight: 700; letter-spacing: -.015em; line-height: 1.12; }
h3.rotulo, div.rotulo { font-weight: 600; }
/* Cifras: misma letra del texto, con numeros de ancho fijo para que las columnas cuadren */
.mono { font-family: var(--cuerpo); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.005em; }
.gris { color: var(--gris); }
.chico { font-size: 14px; }
.t-xl { font-size: 30px; } .t-l { font-size: 22px; } .t-m { font-size: 18px; }
.fuerte { font-weight: 600; }
.crece { flex: 1 1 auto; min-width: 0; }

/* ---- Disposicion ---- */
.fila { display: flex; align-items: center; gap: 12px; }
.fila.entre { justify-content: space-between; }
.fila.arriba { align-items: flex-start; }
.fila.envuelve { flex-wrap: wrap; }
.pila { display: flex; flex-direction: column; gap: 12px; }
.g4 { gap: 4px; } .g8 { gap: 8px; } .g12 { gap: 12px; } .g16 { gap: 16px; } .g20 { gap: 20px; }
.rejilla { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); align-items: start; }
.rejilla.ancha { grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); }
.rejilla.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rejilla.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tarjeta.oscura .codigo-grande { color: #fff; }
.rejilla.c6 { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }

/* ---- Pagina del cliente: una columna tipo telefono ---- */
.movil { max-width: 480px; min-height: 100vh; margin: 0 auto; display: flex; flex-direction: column; background: var(--suelo); }
.movil main { flex: 1 1 auto; padding: 20px 16px; display: flex; flex-direction: column; gap: 18px; }
.pie { position: sticky; bottom: 0; padding: 12px 16px 16px; background: var(--sup); border-radius: var(--r-hoja) var(--r-hoja) 0 0; box-shadow: 0 -1px 0 var(--linea), 0 -10px 28px rgba(12, 51, 34, .10); display: flex; flex-direction: column; gap: 8px; }

/* Barras: degradado de marca con texto blanco. La del cliente es fija arriba; la del personal (oscura) no. */
.barra { position: sticky; top: 0; z-index: 5; background: var(--bosque) linear-gradient(120deg, var(--bosque), var(--verde-osc)); color: #fff; padding: 10px 16px; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.barra .rotulo { color: #fff; }
.barra .sub { font-size: 13px; }
.barra .sub, .barra .gris { color: #CFE9D8; }
.barra.oscura { position: static; padding: 10px 24px; flex-wrap: wrap; }
.icono-boton { position: relative; width: 44px; height: 44px; flex: 0 0 44px; border: 0; border-radius: 50%; background: transparent; color: inherit; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.icono-boton:hover { background: var(--hundido); }
.icono-boton.fondo { background: var(--verde-tinte); color: var(--verde-osc); }
.globo { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--verde); color: #fff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--sup); }

/* ---- Botones: un solo color para actuar; el ambar queda reservado para el recogido ---- */
.boton { min-height: 48px; padding: 0 20px; border: 1px solid transparent; border-radius: var(--r-control); font-size: 16px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--verde); color: #fff; transition: background-color .15s, transform .08s; }
.boton:hover { background: var(--verde-osc); }
.boton:active { transform: scale(.98); }
.boton.suave { background: var(--verde-tinte); color: var(--verde-osc); }
.boton.suave:hover { background: #CDE9D6; }
.boton.azul { background: var(--azul); color: #fff; }
.boton.azul:hover { background: #1A43BB; }
.boton.contorno { background: var(--sup); border-color: var(--linea2); color: var(--tinta); font-weight: 600; }
.boton.contorno:hover { background: var(--suelo); }
.boton.peligro { background: var(--sup); border-color: var(--rojo); color: var(--rojo); }
.boton.peligro:hover { background: var(--rojo-tinte); }
.boton.claro { background: rgba(255, 255, 255, .10); border-color: rgba(255, 255, 255, .35); color: #fff; font-weight: 600; }
.boton.claro:hover { background: rgba(255, 255, 255, .18); }
.boton.claro.atencion { background: var(--ambar); border-color: var(--ambar); color: var(--ambar-texto); }
.boton.claro.atencion:hover { background: #FFD257; }
.boton.chico { min-height: 44px; padding: 0 14px; font-size: 14px; white-space: nowrap; }
.boton.grande { min-height: 56px; font-size: 18px; border-radius: 16px; }
.boton.ancho { width: 100%; }
.boton:disabled, .boton:disabled:hover { background: var(--hundido); border: 1px solid var(--linea); color: #55635B; transform: none; }
.enlace { display: inline-flex; align-items: center; border: 0; background: none; padding: 0; min-height: 44px; color: var(--verde-osc); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---- Campos ---- */
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo > label, .campo > .nombre { font-size: 14px; font-weight: 600; }
.entrada { height: 48px; width: 100%; min-width: 0; padding: 0 14px; border: 1px solid var(--linea2); border-radius: var(--r-control); background: var(--sup); font-size: 16px; transition: border-color .15s, box-shadow .15s; }
.entrada::placeholder { color: #66746C; }
.entrada:hover { border-color: var(--tinta); }
.entrada:focus { border-color: var(--verde); box-shadow: 0 0 0 3px var(--verde-tinte); outline: none; }
.entrada:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; box-shadow: none; }
textarea.entrada { height: auto; padding: 12px 14px; }
select.entrada { padding-right: 8px; }
input[type="search"].entrada { padding-left: 44px; background-repeat: no-repeat; background-position: 14px 50%; background-size: 20px 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355635B' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E"); }
.entrada.codigo { font-family: var(--rotulo); font-weight: 700; font-size: 30px; text-align: center; letter-spacing: .28em; padding-left: .28em; height: 64px; font-variant-numeric: tabular-nums; }
.entrada.cantidad { font-weight: 700; font-size: 18px; width: 120px; font-variant-numeric: tabular-nums; }
.casilla { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 8px 0; }
.casilla input { width: 24px; height: 24px; margin: 0; flex: 0 0 24px; accent-color: var(--verde); }

/* ---- Tarjetas, etiquetas, avisos ---- */
.tarjeta { background: var(--sup); border: 1px solid var(--linea); border-radius: var(--r-tarjeta); padding: 16px; box-shadow: var(--sombra-1); }
.tarjeta.gruesa { border-color: var(--linea); box-shadow: var(--sombra-2); }
/* El momento clave de cada pantalla: bosque, y dentro de ella el unico boton ambar del sistema */
.tarjeta.oscura { background: var(--bosque); color: #fff; border: 0; border-radius: var(--r-hoja); padding: 22px; box-shadow: var(--sombra-2); }
.tarjeta.oscura .gris { color: #CFE3D6; }
.tarjeta.oscura .boton { background: var(--ambar); color: var(--tinta); }
.tarjeta.oscura .boton:hover { background: #FFD25E; }
.tarjeta.azul { background: var(--azul-tinte); border: 1.5px solid var(--azul); box-shadow: none; }
.tarjeta.amplia { padding: 22px; }
.etiqueta { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--hundido); color: var(--tinta); white-space: nowrap; }
.etiqueta.pesado { background: var(--ambar-tinte); color: var(--ambar-texto); }
.etiqueta.alerta { background: var(--rojo-tinte); color: #8C1D17; }
.etiqueta.peso { background: var(--verde-tinte); color: var(--verde-osc); }
.etiqueta.ok { background: var(--verde); color: #fff; }
.etiqueta.azul-et { background: var(--azul-tinte); color: #173EAD; }
.aviso { border-radius: var(--r-control); padding: 12px 14px; font-size: 14px; background: var(--hundido); }
.aviso.ambar { background: var(--ambar-tinte); color: var(--ambar-texto); }
/* Un boton dentro de un aviso puede partir su texto: en pantallas angostas no se sale del aviso. */
.aviso .boton { white-space: normal; max-width: 100%; padding-top: 8px; padding-bottom: 8px; text-align: center; }
.error { color: var(--rojo); font-size: 14px; font-weight: 600; }
.renglon { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--linea); }
.renglon:first-child { padding-top: 2px; }
.renglon:last-child { border-bottom: 0; padding-bottom: 2px; }
.renglon.envuelve { flex-wrap: wrap; align-items: center; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; border-top: 1px solid var(--linea); font-weight: 700; font-size: 18px; }
.total .mono { font-family: var(--rotulo); font-size: 22px; }

/* ---- Catalogo ---- */
.fichas { display: flex; flex-wrap: wrap; gap: 8px; }
.ficha { min-height: 44px; padding: 6px 16px; border: 1px solid var(--linea); border-radius: 22px; background: var(--sup); font-size: 14px; font-weight: 600; white-space: nowrap; transition: background-color .15s, border-color .15s; }
.ficha:hover { border-color: var(--linea2); }
.ficha[aria-pressed="true"] { background: var(--bosque); border-color: var(--bosque); color: #fff; }
.producto { display: flex; gap: 14px; }
.marca-prod { font-size: 13px; font-weight: 600; color: var(--verde-osc); }
.recorte2 { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.foto { width: 80px; height: 80px; flex: 0 0 80px; border-radius: 16px; background: var(--verde-tinte); color: var(--verde-osc); font-family: var(--rotulo); font-weight: 700; font-size: 28px; display: flex; align-items: center; justify-content: center; }
/* Foto real: entera (sin recortar el producto) sobre blanco, con un borde fino para que no flote. */
img.foto, canvas.foto { display: block; object-fit: contain; background: #fff; border: 1px solid var(--linea); }
.foto.chica { width: 44px; height: 44px; flex-basis: 44px; border-radius: 10px; font-size: 18px; }
.foto.grande { width: 120px; height: 120px; flex-basis: 120px; border-radius: 18px; }
.foto.vacia { background: var(--hundido); color: var(--gris); font-family: var(--cuerpo); font-size: 14px; font-weight: 600; border: 1px dashed var(--linea2); }
.foto-boton { flex: 0 0 auto; align-self: flex-start; padding: 0; border: 0; border-radius: 16px; background: transparent; cursor: zoom-in; line-height: 0; }
.foto-boton:hover .foto { border-color: var(--linea2); }
.foto-editor { flex: 0 0 auto; }
/* Visor de la foto en grande */
.visor { width: min(92vw, 640px); max-height: 92vh; padding: 0; border: 0; border-radius: var(--r-hoja); background: var(--sup); color: var(--tinta); box-shadow: var(--sombra-2); overflow: hidden; }
.visor::backdrop { background: rgba(12, 51, 34, .66); }
.visor img { display: block; width: 100%; height: auto; max-height: calc(92vh - 76px); object-fit: contain; background: #fff; }
.visor-pie { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--linea); }
.contador { display: inline-flex; align-self: flex-start; width: fit-content; align-items: center; gap: 2px; padding: 0; border-radius: 14px; background: var(--hundido); }
.contador button { width: 44px; height: 44px; border: 0; border-radius: 14px; background: transparent; font-size: 22px; font-weight: 600; line-height: 1; color: var(--verde-osc); }
.contador button:hover { background: var(--verde-tinte); }
.contador span { min-width: 44px; padding: 0 6px; text-align: center; white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---- Ventanas y opciones ---- */
.opcion { min-height: 60px; border: 1px solid var(--linea); border-radius: 14px; background: var(--sup); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 4px; transition: border-color .15s, background-color .15s; }
.opcion:hover { border-color: var(--linea2); }
.opcion .hora { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.opcion .nota { font-size: 12px; color: var(--gris); }
.opcion[aria-pressed="true"] { background: var(--verde-tinte); border: 2px solid var(--verde); color: var(--verde-osc); }
.opcion[aria-pressed="true"] .nota { color: var(--verde-osc); font-weight: 600; }
.opcion:disabled { background: var(--hundido); border-style: dashed; border-color: var(--linea2); color: #55635B; }
.opcion:disabled .hora { text-decoration: line-through; }
.opcion.numero { font-family: var(--rotulo); font-weight: 700; font-size: 20px; min-height: 56px; }
.metodo { display: flex; align-items: flex-start; gap: 12px; padding: 16px; background: var(--sup); border: 1px solid var(--linea); border-radius: var(--r-tarjeta); cursor: pointer; transition: border-color .15s, background-color .15s; }
.metodo:hover { border-color: var(--linea2); }
.metodo.elegido { border: 2px solid var(--verde); padding: 15px; background: #F5FBF7; }
.metodo.apagado { background: var(--hundido); border-style: dashed; border-color: var(--linea2); cursor: not-allowed; }
.metodo:has(input:focus-visible) { outline: 3px solid var(--azul); outline-offset: 2px; }
.metodo input { width: 22px; height: 22px; margin: 1px 0 0; flex: 0 0 22px; accent-color: var(--verde); }

/* ---- Estado de la orden ---- */
.pasos { list-style: none; margin: 0; padding: 4px 4px 0; }
.pasos li { display: flex; gap: 14px; align-items: flex-start; }
.pasos .marca { display: flex; flex-direction: column; align-items: center; }
.pasos .punto { width: 28px; height: 28px; border-radius: 14px; border: 2px solid var(--linea2); background: var(--sup); color: #fff; display: flex; align-items: center; justify-content: center; }
.pasos .hecho .punto { background: var(--verde); border-color: var(--verde); }
.pasos .actual .punto { background: var(--ambar); border: 2px solid var(--bosque); box-shadow: 0 0 0 4px var(--ambar-tinte); }
.pasos .linea { width: 2px; height: 18px; background: var(--linea); }
.pasos .hecho .linea { background: var(--verde); }
.pasos .texto { flex: 1 1 auto; display: flex; justify-content: space-between; gap: 8px; padding-top: 3px; font-size: 15px; }
.pasos .actual .texto { font-weight: 700; }
.pasos .pendiente .texto { color: var(--gris); }
.codigo-grande { font-family: var(--rotulo); font-weight: 700; font-size: 64px; line-height: 1; letter-spacing: .14em; padding-left: .14em; font-variant-numeric: tabular-nums; color: var(--bosque); }
.cuadro-espacio { width: 72px; height: 64px; flex: 0 0 72px; border-radius: 16px; background: var(--azul); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.cuadro-espacio small { font-size: 12px; font-weight: 600; }
.cuadro-espacio b { font-family: var(--rotulo); font-size: 28px; line-height: 1; }
.girando { width: 22px; height: 22px; border: 3px solid var(--linea); border-top-color: var(--verde); border-radius: 50%; animation: giro 1s linear infinite; flex: 0 0 22px; }
@keyframes giro { to { transform: rotate(360deg); } }

/* ---- Panel y administracion ---- */
.pagina { min-height: 100vh; display: flex; flex-direction: column; background: var(--suelo); }
.pagina > main { flex: 1 1 auto; padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.columna-titulo { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: var(--r-control); background: var(--hundido); }
.columna-titulo .mono { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 14px; background: var(--sup); display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.columna-titulo.azul { background: var(--azul); color: #fff; }
.columna-titulo.azul .mono { color: var(--azul); }
.orden-boton { width: 100%; text-align: left; border: 1px solid var(--linea); border-radius: var(--r-tarjeta); background: var(--sup); padding: 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--sombra-1); transition: box-shadow .15s, border-color .15s, transform .08s; }
.orden-boton.llego { background: var(--azul-tinte); border: 1.5px solid var(--azul); }
.orden-boton:hover { border-color: var(--linea2); box-shadow: var(--sombra-2); }
.orden-boton:active { transform: scale(.99); }
.acceso { max-width: 440px; width: calc(100% - 32px); margin: 56px auto; padding: 28px; background: var(--sup); border: 1px solid var(--linea); border-radius: var(--r-hoja); box-shadow: var(--sombra-2); }
.con-menu { flex: 1 1 auto; display: flex; align-items: stretch; }
.menu { flex: 0 0 232px; padding: 20px 14px; background: var(--sup); border-right: 1px solid var(--linea); display: flex; flex-direction: column; gap: 4px; }
.menu button { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px; border: 0; border-radius: var(--r-control); background: transparent; text-align: left; font-size: 15px; font-weight: 600; color: var(--gris); transition: background-color .15s, color .15s; }
.menu button svg { flex: 0 0 20px; }
.menu button:hover { background: var(--suelo); color: var(--tinta); }
.menu button[aria-current="page"] { background: var(--verde-tinte); color: var(--verde-osc); font-weight: 700; }
.con-menu > main { flex: 1 1 600px; min-width: 0; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.tabla-caja { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
/* Las tablas anchas se desplazan de lado en pantallas pequenas en vez de aplastar sus columnas. */
table.ancha { min-width: 940px; }
table.ancha td:first-child { min-width: 220px; }
table.media { min-width: 520px; }
/* Personal: el correo largo se parte para que quepan los tres botones de la fila. */
table.personal td:first-child { max-width: 270px; overflow-wrap: anywhere; }
table.personal .fila { gap: 8px; }
td select.entrada { min-width: 160px; }
td .entrada.cantidad { width: 96px; }
details > summary { padding: 12px 0; cursor: pointer; font-weight: 600; }
th { text-align: left; font-size: 13px; font-weight: 600; color: var(--gris); padding: 8px 8px 8px 0; white-space: nowrap; border-bottom: 1px solid var(--linea); }
td { padding: 11px 8px 11px 0; border-top: 1px solid var(--linea); vertical-align: middle; }
tbody tr:first-child td { border-top: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
/* Cifras del dia: una por estado; las cerradas van mas quietas */
.cifras { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
/* Con importes de dinero: columnas mas anchas y numeros algo menores, para que $12,345.67 quepa en un telefono. */
.cifras.anchas { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.cifras.anchas .n { font-size: 26px; overflow-wrap: anywhere; }
.cifra { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: 20px; background: var(--verde-osc) linear-gradient(135deg, var(--verde), var(--verde-osc)); color: #fff; box-shadow: var(--sombra-1); }
.cifra .n { font-family: var(--rotulo); font-weight: 700; font-size: 38px; line-height: 1; font-variant-numeric: tabular-nums; }
.cifra .que { font-size: 14px; font-weight: 600; }
.cifra.azul { background: #173EAD linear-gradient(135deg, #2457E6, #173EAD); color: #fff; }
.cifra.cerrada { background: var(--sup); color: var(--tinta); }
.cifra.cerrada .que { color: var(--gris); }
.bajo { color: var(--rojo); font-weight: 700; }
.barrita { height: 8px; min-width: 80px; border-radius: 4px; background: var(--hundido); }
.barrita > div { height: 8px; border-radius: 4px; background: var(--verde); }
.barrita.llena > div { background: var(--bosque); }
/* En un telefono la tabla de productos vendidos deja solo lo que importa: que, cuanto y por cuanto. */
@media (max-width: 480px) { .solo-ancho { display: none; } }
.apagada { opacity: .6; }
.formulario { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); align-items: end; }
.formulario .completo { grid-column: 1 / -1; }
.clave-temporal { font-size: 20px; font-weight: 700; padding: 12px 14px; background: var(--ambar-tinte); border-radius: var(--r-control); user-select: all; overflow-wrap: anywhere; letter-spacing: .02em; }
.aviso-flotante { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); width: max-content; max-width: min(92vw, 520px); z-index: 10; padding: 12px 18px; border-radius: 14px; background: var(--verde); color: #fff; font-size: 15px; font-weight: 500; box-shadow: var(--sombra-2); animation: entra .18s ease-out; }
.aviso-flotante.malo { background: var(--rojo); }
@keyframes entra { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.rompe { overflow-wrap: anywhere; }      /* un correo largo se parte en vez de salirse */
.cinta-prueba { background: var(--ambar-tinte); color: var(--ambar-texto); font-size: 13px; font-weight: 600; text-align: center; padding: 5px 8px; }
/* Panel de tienda sin conexion con el servidor: se queda fija abajo hasta que vuelve. */
.cinta-aviso { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; padding: 10px 16px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--rojo); color: #fff; font-size: 14px; text-align: center; box-shadow: var(--sombra-2); }

/* =====================================================================
   Tema vibrante: tarjetas que flotan sin borde, cifras en verde lleno y amarillo para lo elegido.
   Colores con contraste AA. (Las barras ya van con el degradado arriba.)
   ===================================================================== */
.barra .icono-boton { background: rgba(255, 255, 255, .14); color: #fff; }
.barra .icono-boton:hover { background: rgba(255, 255, 255, .24); }
.barra .icono-boton.fondo { background: var(--ambar); color: var(--tinta); }
.barra .globo { background: #fff; color: var(--verde-osc); box-shadow: 0 0 0 2px var(--verde-osc); }
h1 { letter-spacing: -.03em; } h2 { letter-spacing: -.02em; }
.tarjeta, .orden-boton { border-color: transparent; }
.tarjeta { box-shadow: var(--sombra-1); }
.ficha { border-color: transparent; box-shadow: var(--sombra-1); }
.ficha[aria-pressed="true"] { background: var(--ambar); border-color: var(--ambar); color: var(--tinta); }
.foto { background: linear-gradient(135deg, var(--verde-tinte), var(--ambar-tinte)); border-radius: 20px; }
/* Sombra verde solo en el boton verde principal activo: ni en los apagados, ni en los rojos o azules, ni en el ambar. */
.boton:not(.suave):not(.contorno):not(.claro):not(.chico):not(.peligro):not(.azul):not(.atencion):not(:disabled) { box-shadow: 0 8px 18px -8px rgba(11, 128, 64, .7); }
.tarjeta.oscura .boton { box-shadow: none; }
.menu button[aria-current="page"] { background: var(--verde); color: #fff; }
.columna-titulo { background: var(--sup); box-shadow: var(--sombra-1); }
.acceso { border: 0; }
.foto-entrega:empty { display: none; }
.foto-entrega canvas, .foto-entrega-img { display: block; max-width: 100%; height: auto; max-height: 260px; border-radius: 14px; border: 1px solid var(--linea); }
.foto-entrega-cliente { display: block; width: 100%; height: auto; border-radius: 16px; }
.separador { border: 0; border-top: 1px solid var(--linea); margin: 0; width: 100%; }
.cifra.error-cifra { background: var(--rojo-tinte); color: #8C1D17; }

/* =====================================================================
   Movimiento
   Regla: el movimiento responde a algo que la persona hizo o a algo que cambio (una orden que avanza,
   una foto que llega). Nada se mueve por adorno. Todo queda apagado con "reducir movimiento".
   ===================================================================== */
/* Esqueleto de carga: la forma de la pagina mientras llegan los datos. */
.esqueleto { flex: 1 1 auto; display: flex; flex-direction: column; }
.hueso { display: block; flex: 0 0 auto; border-radius: 8px; background: var(--hundido); }
.h-titulo { width: 168px; height: 24px; } .h-linea { width: 100%; height: 14px; } .h-linea.corta { width: 58%; } .h-linea.minima { width: 28%; }
.h-circulo { width: 44px; height: 44px; border-radius: 50%; } .h-campo { height: 48px; border-radius: var(--r-control); }
.h-ficha { width: 88px; height: 44px; border-radius: 22px; } .h-foto { width: 80px; height: 80px; border-radius: 16px; }
img.foto { transition: opacity .24s ease-out; }
img.foto.llegando { opacity: 0; }                              /* la foto aparece suave la primera vez que llega */

@media (prefers-reduced-motion: no-preference) {
  .hueso { background: linear-gradient(100deg, var(--hundido) 35%, #F6F9F4 50%, var(--hundido) 65%) 0 0 / 300% 100%; animation: brillo 1.5s linear infinite; }
  @keyframes brillo { from { background-position: 150% 0; } to { background-position: -150% 0; } }

  /* Respuesta a lo que se toca */
  .aparece { animation: aparece .2s var(--curva); }
  @keyframes aparece { from { opacity: 0; transform: scale(.86); } }
  .sube-cifra { animation: sube-cifra .18s var(--curva); }
  .baja-cifra { animation: baja-cifra .18s var(--curva); }
  @keyframes sube-cifra { from { opacity: 0; transform: translateY(9px); } }
  @keyframes baja-cifra { from { opacity: 0; transform: translateY(-9px); } }
  .salta { animation: salta .36s var(--curva); }
  @keyframes salta { 35% { transform: scale(1.4); } }
  .pie.sube { animation: sube .3s var(--curva); }
  @keyframes sube { from { transform: translateY(100%); } }
  .aviso-flotante.sale { animation: sale .2s ease-in forwards; }
  @keyframes sale { to { opacity: 0; transform: translate(-50%, -8px); } }

  /* Lo que cambia solo */
  .pasos .actual .punto { animation: late 2.4s ease-in-out infinite; }           /* el paso en curso "respira" */
  @keyframes late { 50% { box-shadow: 0 0 0 9px var(--ambar-tinte); } }
  .orden-boton.nueva { animation: destello 2.2s ease-out; }                       /* orden recien llegada al panel */
  @keyframes destello { 0%, 45% { box-shadow: 0 0 0 4px var(--ambar), var(--sombra-2); } }

  /* Cambios de pantalla (View Transitions). La barra y el menu se quedan en su sitio; el contenido se desliza. */
  .barra { view-transition-name: barra; }
  .menu { view-transition-name: menu; }
  .movil > .pie { view-transition-name: pie; }
  /* Duran poco a proposito: mientras dura un cambio de pantalla el navegador no atiende toques. */
  ::view-transition-group(*) { animation-duration: .26s; animation-timing-function: var(--curva); }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
  html[data-paso="adelante"]::view-transition-old(root) { animation: .12s ease-in both sale-izq; }
  html[data-paso="adelante"]::view-transition-new(root) { animation: .22s var(--curva) .05s both entra-der; }
  html[data-paso="atras"]::view-transition-old(root) { animation: .12s ease-in both sale-der; }
  html[data-paso="atras"]::view-transition-new(root) { animation: .22s var(--curva) .05s both entra-izq; }
  @keyframes sale-izq { to { opacity: 0; transform: translateX(-22px); } }
  @keyframes entra-der { from { opacity: 0; transform: translateX(30px); } }
  @keyframes sale-der { to { opacity: 0; transform: translateX(22px); } }
  @keyframes entra-izq { from { opacity: 0; transform: translateX(-30px); } }
  ::view-transition-new(pie):only-child { animation: .24s var(--curva) both sube; }
  ::view-transition-old(pie):only-child { animation: .12s ease-in both reverse sube; }
  /* La foto crece desde su miniatura: las dos imagenes conservan su proporcion durante el recorrido. */
  ::view-transition-group(foto) { animation-duration: .28s; }
  ::view-transition-old(foto), ::view-transition-new(foto) { width: 100%; height: 100%; object-fit: contain; }
  /* Navegadores sin View Transitions: el visor al menos aparece suave. */
  @supports not (view-transition-name: none) {
    .visor[open] { animation: aparece .2s var(--curva); }
    .visor[open]::backdrop { animation: fundido .2s ease-out; }
    @keyframes fundido { from { opacity: 0; } }
  }
}

@media (prefers-reduced-motion: reduce) {
  .girando, .aviso-flotante { animation: none; }
  img.foto { transition: none; }
  .boton, .orden-boton, .entrada, .ficha, .opcion, .metodo, .menu button { transition: none; }
  .boton:active, .orden-boton:active { transform: none; }
}
@media (max-width: 900px) {
  /* El menu pasa a ser una tira horizontal encima del contenido. En columna, y sin crecer: asi el espacio
     que sobra en pantallas altas se lo queda el contenido y no estira los botones del menu. */
  .con-menu { flex-direction: column; }
  .menu { flex: 0 0 auto; flex-direction: row; align-items: center; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; border-right: 0; border-bottom: 1px solid var(--linea); padding: 8px 12px; }
  .menu::-webkit-scrollbar { display: none; }
  .menu button { flex: 0 0 auto; white-space: nowrap; }
  .con-menu > main { flex: 1 1 auto; }
}
/* Telefonos muy angostos (320 px): las etiquetas largas parten su texto en vez de salirse. */
@media (max-width: 359px) {
  .etiqueta { white-space: normal; }
  .movil main { padding: 16px 12px; }
  .rejilla.c6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .pagina > main, .con-menu > main { padding: 16px; }
  .acceso { margin: 24px auto; padding: 22px; }
  .barra.oscura { padding: 10px 16px; }
  .barra.oscura .quien { display: none; }
}
/* En pantallas anchas la pagina del cliente se ve como una columna sobre un fondo mas hundido. */
@media (min-width: 560px) {
  body { background: var(--hundido); }
  .movil { box-shadow: var(--sombra-2); }
}

/* Paginas de texto: terminos, privacidad */
.legal { max-width: 720px; line-height: 1.6; }
.legal h2 { font-family: var(--rotulo); font-size: 19px; letter-spacing: -.01em; margin: 20px 0 0; }
.legal p, .legal ul { margin: 0; }
.legal ul { padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.legal a, .pie-legal a, .consentimiento a { color: var(--verde-osc); font-weight: 600; }
a.renglon { text-decoration: none; color: inherit; align-items: center; }
/* Pie con la identificacion del comercio */
.pie-legal { font-size: 13px; line-height: 1.55; color: var(--gris); padding: 20px 16px 24px; border-top: 1px solid var(--linea); }
.consentimiento { font-size: 13px; line-height: 1.5; color: var(--gris); }

/* Modo de alto contraste del sistema: los fondos de color desaparecen, asi que el borde dice donde esta cada cosa. */
@media (forced-colors: active) {
  .etiqueta, .aviso, .cifra, .contador, .foto, .cuadro-espacio, .columna-titulo, .clave-temporal, .cinta-prueba, .cinta-aviso, .tarjeta.oscura { border: 1px solid CanvasText; }
  .barrita { border: 1px solid CanvasText; }
  .barrita > div { background: Highlight; }
  .pasos .hecho .punto, .pasos .actual .punto { forced-color-adjust: none; background: Highlight; border-color: Highlight; color: HighlightText; box-shadow: none; }
  /* El tema quita los bordes y deja solo sombras, que el modo de alto contraste no dibuja: aqui vuelven. */
  .tarjeta, .orden-boton, .opcion, .metodo, .ficha, .separador { border: 1px solid CanvasText; }
  .opcion[aria-pressed="true"], .ficha[aria-pressed="true"], .menu button[aria-current="page"], .metodo.elegido { border: 2px solid Highlight; }
}
/* Al imprimir la pagina de una orden: solo el contenido, sin barras fijas ni botones. */
@media print {
  body, .movil, .pagina { background: #fff; }
  /* Al imprimir no salen los fondos: lo que va en blanco sobre verde pasa a negro sobre blanco. */
  .barra, .barra.oscura { position: static; background: #fff; color: #000; border-bottom: 1px solid #000; }
  .barra .rotulo, .barra .sub, .barra .gris { color: #000; }
  .cifra, .cifra.azul, .cifra.cerrada, .menu button[aria-current="page"] { background: #fff; color: #000; border: 1px solid #000; box-shadow: none; }
  .pie, .cinta-prueba, .cinta-aviso, .aviso-flotante, .menu, .boton, .enlace, .icono-boton, .contador button { display: none !important; }
  .movil { max-width: none; box-shadow: none; }
  .tarjeta, .tarjeta.oscura { box-shadow: none; border: 1px solid #999; background: #fff; color: #000; break-inside: avoid; }
  .tarjeta.oscura .gris { color: #333; }
  a { color: #000; }
}
