/* Interfaz nueva de la tienda (mockup de la reestructura): online-existencias.
   Pedidos online (pedidos_web, encargo_nuevo, boleta_encargo) y Existencias (inventario, traspaso, traspaso_firma,
   traspaso_pedir). Todo va dentro de .oe (la clase que llevan esas pantallas), con los colores de SUN. */

/* ── Piezas comunes ── */
.oe .seccion-t { margin: 8px 2px -4px; }
.oe .seccion-t h2 { font-size: 15.5px; }
.oe .tarjeta.filas > .it:first-child { border-top: 0; }
.oe .estado { white-space: nowrap; }
.oe .prod-volver-a { margin: 4px 2px 0; }
/* Elegir una opción (el .elegir del mockup): dos o más cajas, la marcada con borde oscuro y su punto */
.oe-elegir { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.oe-elegir label { position: relative; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 14px; margin: 0;
                   background: var(--papel); border: 1.5px solid var(--linea-fuerte); border-radius: var(--radio-chico);
                   font-size: 15px; font-weight: 600; color: var(--tinta); cursor: pointer; }
.oe-elegir input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.oe-elegir span::before { content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 10px; vertical-align: -3px; border-radius: 50%;
                          border: 1.5px solid var(--linea-fuerte); background: var(--papel); box-sizing: border-box; }
.oe-elegir label:has(input:checked) { border-color: var(--g800); background: var(--marca-suave); }
.oe-elegir input:checked + span::before { border: 5px solid var(--g800); }
.oe-elegir label:has(input:focus-visible) { outline: 3px solid var(--marca-fuerte); outline-offset: 2px; }
/* La acción principal abajo: oscura (la de firmar con clave sigue verde, como en el mockup) */
.oe.encargo-nuevo .oe-pie .boton:not(.claro), .oe.traspaso-pedir .oe-pie .boton:not(.claro), .oe.inventario .oe-pie .boton { background: var(--primario); }
.oe.encargo-nuevo .oe-pie .boton:not(.claro):hover, .oe.traspaso-pedir .oe-pie .boton:not(.claro):hover,
.oe.inventario .oe-pie .boton:hover { background: var(--primario-hover); }
.oe-pie .campo-f small { font-weight: 400; }
@media (min-width: 900px) {
  .oe-pie { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
  .oe-pie > .campo-f { flex: 1 1 220px; }
  .oe-pie > .boton { width: auto; min-width: 220px; min-height: 48px; margin-left: auto; }
  .oe-pie > p { flex-basis: 100%; }
}

/* ── Existencias › Lo que hay y Entre tiendas (mockups exist-hoy y exist-entre) ── */
/* Una fila de entre tiendas: lo que lleva a la izquierda; el estado y los botones a la derecha (abajo si no caben) */
.oe-mov { flex-wrap: wrap; row-gap: 8px; }
.oe-mov .tx { flex: 1 1 220px; }
.oe-mov .tx b { font-weight: 700; }
.oe-ir { color: var(--tinta); text-decoration: none; }
.oe-ir:hover { text-decoration: underline; }
.oe-acciones { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
.oe-acciones .boton.ancho-auto { min-height: 38px; padding: 7px 16px; font-size: 14px; }
/* Lo que hay: el nombre a la izquierda y la cifra grande a la derecha */
.oe-cab { display: flex; justify-content: space-between; padding: 0 18px; margin: 0 0 -8px; }
.oe-hay .it { min-height: 64px; }
.oe-hay .tx b { font-weight: 700; }
.oe-hay .tx small { margin-top: 3px; line-height: 1.5; }
.oe-hay .tx small .estado { padding: 1px 8px 1px 7px; margin-right: 4px; font-size: 11.5px; vertical-align: 1px; }
.oe-hay .tx small b { color: var(--tinta); font-weight: 700; }
.oe-n { flex: none; min-width: 44px; text-align: right; font-family: var(--letra-titulos); font-size: 26px; font-weight: 600; line-height: 1.1;
        font-variant-numeric: tabular-nums; color: var(--tinta); }
.oe-n.cero { color: var(--alerta); }
.oe .existencias { display: flex; flex-direction: column; gap: 14px; }
.oe .existencias > * { margin: 0; }
.oe .existencias > .seccion-t { margin: 8px 2px -4px; }
/* El botón «Pedir a otra tienda» al final, sin caja alrededor */
.oe.inventario .oe-pie { position: static; padding: 0; margin-top: 4px; background: none; border: 0; box-shadow: none; }

/* ── Un traspaso: lo que te toca, cómo va y los productos; «No puedo mandarlo» y «Anular» como pasos ── */
.oe-ahora { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.oe-ahora h2 { margin: 0; font-size: 18px; }
.oe-ahora p { margin: 0; }
.oe-ahora .boton, .oe-ahora form { width: 100%; }
.oe-ahora form { margin: 4px 0 0; }
@media (min-width: 900px) { .oe-ahora .boton, .oe-ahora form { width: auto; min-width: 240px; } .oe-ahora form .boton { width: 100%; } }
.oe.traspaso .tarjeta.filas .tabla-envuelta { border: 0; border-radius: 0; box-shadow: none; margin: 0; }
.oe-paso > summary { cursor: pointer; list-style: none; border-bottom: 0; }
.oe-paso > summary::-webkit-details-marker { display: none; }
.oe-paso > summary .ico { transition: transform .15s; color: var(--tenue); }
.oe-paso[open] > summary { border-bottom: 1px solid var(--linea); }
.oe-paso[open] > summary .ico { transform: rotate(90deg); }
.oe-paso .traspaso-no { padding: 14px 18px 18px; }
.oe-paso .traspaso-no p { margin: 0; }

/* ── Pedir a otra tienda (mockup exist-pedir) ── */
.oe.traspaso-pedir > form > .seccion-t { margin: 8px 2px -4px; }
.oe.traspaso-pedir .lista-pedir-caja { padding: 0; }

/* ── Pedidos online (mockup online-encargos): una tarjeta por pedido, siempre en el mismo orden ── */
.oe.pedidos-web .web-grupos { gap: 12px; }
.oe.pedidos-web .web-t { margin: 12px 2px -2px; font-size: 15.5px; }
.oe.pedidos-web .web-t:first-child { margin-top: 0; }
.web-pedido { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; }
.web-pedido > p { margin: 0; }
.web-pedido .web-cab { justify-content: space-between; flex-wrap: nowrap; align-items: flex-start; }
.web-pedido .web-cab b { font-size: 15.5px; min-width: 0; }
.web-pedido .web-cab .estado { flex: none; margin-left: auto; }
.web-retira { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-weight: 700; }
.web-retira > .ico { color: var(--suave); }
.web-pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding-top: 10px; margin-top: 2px;
           border-top: 1px solid var(--linea); }
.web-pie > .suave, .web-pie > .chico { flex: 1 1 180px; min-width: 0; }
.web-accion { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
.web-accion:empty { display: none; }
.web-accion .web-marcar { margin: 0; flex-wrap: nowrap; }
.web-accion .web-marcar select { flex: 0 1 auto; min-width: 0; max-width: 160px; padding: 8px 10px; font-size: 14px; }
.web-accion .web-marcar .boton.ancho-auto { min-height: 38px; padding: 7px 16px; font-size: 14px; }
.web-pedido.hecho { background: transparent; box-shadow: none; border-style: dashed; }
.web-hechos .it { flex-wrap: wrap; }
.oe.pedidos-web .web-grupos > .boton.claro { margin-top: 6px; }
@media (max-width: 520px) {
  .web-accion { width: 100%; justify-content: flex-start; margin-left: 0; }
  .web-accion .web-marcar { flex: 1 1 100%; }
  .web-accion .web-marcar select { flex: 1; max-width: none; }
}

/* ── Ingresar un encargo (mockup online-nuevo) ── */
.oe.encargo-nuevo .campo-f > .tarjeta { font-weight: 400; }
.oe.encargo-nuevo .buscar-pedir { font-size: 15px; font-weight: 400; }
.oe-lleva { max-height: 460px; overflow-y: auto; }
.oe-lleva .it { cursor: pointer; min-height: 56px; padding: 8px 12px 8px 18px; }
.oe-lleva .it.con-algo { background: var(--marca-suave); }
.oe-lleva .tx b { font-weight: 600; font-size: 15px; }
.oe-lleva .it input { width: 76px; flex: none; font-weight: 700; font-size: 16px; text-align: center; padding: 8px 6px;
                      border: 0; border-radius: 12px; background: var(--gris); }
.oe-lleva .it input:focus { outline: 2px solid var(--marca-fuerte); background: var(--papel); box-shadow: none; }

/* ── Armar la boleta (mockup online-boleta): las líneas y el total grande ── */
.oe-boleta .it { min-height: 52px; }
.oe-boleta .it > b.num { flex: none; font-variant-numeric: tabular-nums; }
.oe-boleta .oe-total { background: var(--gris-cab); }
.oe-boleta .oe-total .oe-n { font-size: 22px; min-width: 0; }
