/* ===================================================================== punto de venta (POS): PC estilo RMS, tactil en tablet / celular */
.pos { display: flex; flex-direction: column; gap: 0.6rem; height: calc(100vh - 150px); min-height: 520px; }
.pos-barra { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.pos-barra-caja { font-weight: 600; display: inline-flex; align-items: center; gap: 0.3rem; }
.pos-barra-ticket { color: var(--rz-text-secondary-color); font-size: 0.85rem; }
.pos-centro { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 0.8rem; flex: 1; min-height: 0; }
.pos-ticket { display: flex; flex-direction: column; gap: 0.5rem; min-height: 0; }
.pos-entrada { display: flex; gap: 0.5rem; }
.pos-codigo { flex: 1; font-size: 1.25rem; padding: 0.55rem 0.8rem; }
.pos-lineas { flex: 1; overflow: auto; border: 1px solid var(--rz-base-300); border-radius: 6px; background: var(--rz-base-background-color); }
.pos-lineas table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.pos-lineas th { position: sticky; top: 0; background: var(--rz-base-200); text-align: left; padding: 0.4rem 0.6rem; font-size: 0.85rem; }
.pos-lineas td { padding: 0.35rem 0.6rem; border-bottom: 1px solid var(--rz-base-200); vertical-align: middle; }
.pos-lineas tr { cursor: pointer; }
.pos-lineas tr.pos-elegida td { background: var(--rz-primary-lighter); }
.pos-lineas .emint-num { text-align: right; white-space: nowrap; }
.pos-lineas small { color: var(--rz-text-secondary-color); }
.pos-desc { font-weight: 500; }
.pos-cant span { display: inline-block; min-width: 2.5rem; text-align: center; }
.pos-vacio { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.4rem; padding: 3rem 1rem; color: var(--rz-text-secondary-color); }
.pos-vacio .rzi { font-size: 3rem; }
.pos-lado { display: flex; flex-direction: column; gap: 0.6rem; min-height: 0; }
.pos-imagen { flex: 1; min-height: 160px; border: 1px solid var(--rz-base-300); border-radius: 6px; display: flex; flex-direction: column; align-items: center;
              justify-content: center; gap: 0.4rem; padding: 0.5rem; overflow: hidden; background: var(--rz-base-background-color); }
.pos-imagen img { max-width: 100%; max-height: 240px; object-fit: contain; }
.pos-imagen .rzi { font-size: 4rem; color: var(--rz-base-400); }
.pos-imagen span { text-align: center; font-weight: 500; }
.pos-totales { border-radius: 6px; padding: 0.7rem 0.9rem; background: var(--rz-base-200); display: flex; flex-direction: column; gap: 0.2rem; }
.pos-totales div { display: flex; justify-content: space-between; }
.pos-total { font-size: 1.9rem; font-weight: 700; color: var(--rz-primary); }
.pos-error { color: var(--rz-danger); }
.pos-teclas { display: grid; grid-template-columns: repeat(9, 1fr); gap: 0.4rem; }
.pos-teclas button { display: flex; flex-direction: column; align-items: center; gap: 0.1rem; padding: 0.5rem 0.3rem; border-radius: 6px; cursor: pointer;
                     border: 1px solid var(--rz-base-300); background: var(--rz-base-background-color); color: var(--rz-text-color); font-size: 0.85rem; }
.pos-teclas button b { color: var(--rz-primary); font-size: 0.8rem; }
.pos-teclas button:hover { background: var(--rz-base-200); }
.pos-teclas button:disabled { opacity: 0.5; cursor: default; }
.pos-tecla-cobrar { background: var(--rz-primary) !important; color: var(--rz-on-primary) !important; font-weight: 600; }
.pos-tecla-cobrar b { color: var(--rz-on-primary) !important; }
.pos-tactil { display: none; }
.pos-cajas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.8rem; }
.pos-caja { cursor: pointer; display: flex; flex-direction: column; gap: 0.25rem; }
.pos-caja .rzi { font-size: 2rem; color: var(--rz-primary); }
.pos-abierta { color: var(--rz-success); font-weight: 600; }
.pos-cerrada { color: var(--rz-text-secondary-color); }
.pos-pendiente { color: var(--rz-warning-dark, #b45309); font-weight: 600; }
.pos-apertura { max-width: 460px; display: flex; flex-direction: column; gap: 0.8rem; }

/* dialogos del POS */
.pos-dialogo-botones { display: flex; gap: 0.5rem; justify-content: flex-end; flex-wrap: wrap; margin-top: 0.6rem; }
.pos-cobro { display: flex; flex-direction: column; gap: 0.6rem; }
.pos-cobro-total { display: flex; flex-direction: column; align-items: center; }
.pos-cobro-total b { font-size: 2rem; color: var(--rz-primary); }
.pos-cobro-medios { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pos-cobro-fila { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.pos-cobro-medio { min-width: 130px; font-weight: 500; }
.pos-cobro-resumen { display: flex; flex-direction: column; gap: 0.2rem; border-top: 1px solid var(--rz-base-300); padding-top: 0.5rem; }
.pos-cobro-resumen div { display: flex; justify-content: space-between; font-size: 1.1rem; }
.pos-falta b { color: var(--rz-danger); font-size: 1.4rem; }
.pos-vuelto b { color: var(--rz-success); font-size: 1.4rem; }
.pos-cf summary { cursor: pointer; color: var(--rz-text-secondary-color); }
.pos-cf-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; margin-top: 0.4rem; }
.pos-buscar-lista { max-height: 55vh; overflow: auto; display: flex; flex-direction: column; gap: 0.3rem; }
.pos-buscar-item { display: flex; align-items: center; gap: 0.7rem; padding: 0.45rem 0.6rem; border: 1px solid var(--rz-base-300); border-radius: 6px; cursor: pointer; }
.pos-buscar-item:hover { background: var(--rz-base-200); }
.pos-buscar-item.pos-sin-clic { cursor: default; }
.pos-buscar-item img { width: 48px; height: 48px; object-fit: contain; }
.pos-buscar-item .rzi { font-size: 1.8rem; color: var(--rz-base-500); width: 48px; text-align: center; }
.pos-buscar-desc { flex: 1; display: flex; flex-direction: column; }
.pos-buscar-desc small, .pos-buscar-precio small { color: var(--rz-text-secondary-color); }
.pos-buscar-precio { display: flex; flex-direction: column; align-items: flex-end; gap: 0.2rem; }
.pos-arqueo { width: 100%; border-collapse: collapse; }
.pos-arqueo th, .pos-arqueo td { padding: 0.3rem 0.4rem; border-bottom: 1px solid var(--rz-base-200); text-align: left; }
.pos-arqueo .emint-num { text-align: right; }

/* tablet / celular (pantalla tactil o angosta): botonera de rubros y articulos, botones grandes */
@media (pointer: coarse), (max-width: 900px) {
    .pos { height: auto; }
    .pos-centro { grid-template-columns: 1fr; }
    .pos-imagen { min-height: 110px; flex: none; }
    .pos-imagen img { max-height: 120px; }
    .pos-tactil { display: flex; flex-direction: column; gap: 0.5rem; }
    .pos-rubros { display: flex; gap: 0.4rem; overflow-x: auto; padding-bottom: 0.2rem; }
    .pos-botones { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0.5rem; }
    .pos-boton { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem; min-height: 96px; padding: 0.4rem;
                 border-radius: 10px; border: 1px solid var(--rz-base-300); background: var(--rz-base-background-color); color: var(--rz-text-color);
                 font-size: 0.85rem; cursor: pointer; }
    .pos-boton img { width: 56px; height: 56px; object-fit: contain; }
    .pos-boton:active { background: var(--rz-primary-lighter); }
    .pos-teclas { grid-template-columns: repeat(4, 1fr); position: sticky; bottom: 0; background: var(--rz-base-background-color); padding: 0.3rem 0; }
    .pos-teclas button { min-height: 58px; font-size: 0.95rem; }
    .pos-teclas button b { display: none; }
    .pos-lineas td { padding: 0.55rem 0.5rem; }
    .pos-cant .rz-button { min-width: 36px; min-height: 36px; }
}
@media (max-width: 520px) {
    .pos-lineas th:nth-child(3), .pos-lineas td:nth-child(3) { display: none; }
    .pos-total { font-size: 1.5rem; }
    .pos-cf-campos { grid-template-columns: 1fr; }
}

/* pantalla del cliente */
.emint-pantalla { min-height: 100vh; display: flex; flex-direction: column; background: var(--rz-base-background-color); }
.emint-pantalla .emint-pie { margin-top: auto; }
.pos-cli-espera { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 2rem; color: var(--rz-base-400); }
.pos-cli-espera .rzi { font-size: 6rem; }
.pos-cli { flex: 1; display: flex; flex-direction: column; padding: 1.2rem; gap: 1rem; position: relative; }
.pos-cli-cabecera { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.6rem; }
.pos-cli-cabecera span { font-size: 1rem; color: var(--rz-text-secondary-color); }
.pos-cli-cuerpo { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 40%; gap: 1.2rem; min-height: 0; }
.pos-cli-lineas { display: flex; flex-direction: column; gap: 0.3rem; font-size: 1.35rem; overflow: hidden; }
.pos-cli-linea { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--rz-base-200); padding: 0.25rem 0; }
.pos-cli-lado { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; font-size: 1.3rem; text-align: center; }
.pos-cli-lado img { max-width: 100%; max-height: 45vh; object-fit: contain; }
.pos-cli-total { display: flex; justify-content: space-between; align-items: center; background: var(--rz-primary); color: var(--rz-on-primary);
                 border-radius: 10px; padding: 0.8rem 1.4rem; font-size: 1.4rem; }
.pos-cli-total b { font-size: 3rem; }
.pos-cli-mensaje { position: absolute; left: 10%; right: 10%; top: 35%; text-align: center; font-size: 3rem; font-weight: 700; padding: 1.5rem;
                   border-radius: 14px; background: var(--rz-success); color: #fff; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25); }
/* cobro con QR dinamico (Yappy...): en la pantalla del cliente y en la caja */
.pos-cli-qr { position: absolute; inset: 6% 18%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.8rem;
              border-radius: 16px; background: #fff; color: #1b1b1b; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); padding: 1.5rem; text-align: center; }
.pos-cli-qr img { width: min(46vh, 80%); image-rendering: pixelated; }
.pos-cli-qr-titulo { font-size: 2rem; }
.pos-cli-qr-importe { font-size: 3rem; font-weight: 700; }
.pos-cli-qr small { font-size: 1.1rem; color: #555; }
.pos-cli-qr-ok { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; font-size: 2.6rem; font-weight: 700; color: var(--rz-success); }
.pos-cli-qr-ok .rzi { font-size: 8rem; }
.pos-cli-qr-ok small { font-size: 1.4rem; font-weight: 400; }
.pos-qr { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; text-align: center; }
.pos-qr img { width: 240px; image-rendering: pixelated; }
.pos-qr-importe { font-size: 1.3rem; }
.pos-qr-importe b { font-size: 1.8rem; }
.pos-qr-ref, .pos-qr-nota { color: var(--rz-text-secondary-color); }
.pos-qr-estado { display: flex; align-items: center; gap: 0.5rem; font-size: 1.1rem; }
.pos-qr-ok { color: var(--rz-success); font-weight: 700; font-size: 1.4rem; }
.pos-qr-botones { display: flex; gap: 0.8rem; margin-top: 0.4rem; }
@media (max-width: 760px) {
    .pos-cli-qr { inset: 4% 4%; }
    .pos-cli-cuerpo { grid-template-columns: 1fr; }
    .pos-cli-lineas { font-size: 1.05rem; }
    .pos-cli-total b { font-size: 2rem; }
    .pos-cli-mensaje { font-size: 1.8rem; }
}

/* F5 senias: selector de operacion y renglon elegido */
.pos-senia-ops { flex-wrap: wrap; }
.pos-item-elegido { border-color: var(--rz-primary); background: var(--rz-primary-lighter); }

/* F7 socio: busqueda, ficha, cupones y canje por productos; aviso de promociones vigentes y lo que gana el socio */
.pos-socios { display: flex; flex-direction: column; gap: 0.3rem; max-height: 30vh; overflow: auto; }
.pos-socio { display: grid; grid-template-columns: 1fr auto; text-align: left; gap: 0.1rem 0.6rem; padding: 0.45rem 0.6rem; border-radius: 6px; cursor: pointer;
             border: 1px solid var(--rz-base-300); background: var(--rz-base-background-color); color: var(--rz-text-color); }
.pos-socio small { grid-column: 1; color: var(--rz-text-secondary-color); }
.pos-socio span { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-weight: 600; color: var(--rz-primary); }
.pos-socio:hover { background: var(--rz-base-200); }
.pos-socio.pos-elegida { border-color: var(--rz-primary); background: var(--rz-primary-lighter); }
.pos-socio-ficha { display: flex; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; }
.pos-socio-ficha > div:first-child { display: flex; flex-direction: column; gap: 0.2rem; }
.pos-socio-saldos { display: flex; flex-direction: column; gap: 0.15rem; min-width: 220px; }
.pos-socio-saldos div { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.pos-socio-saldos small { color: var(--rz-text-secondary-color); }
.pos-canjes { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.5rem; max-height: 32vh; overflow: auto; }
.pos-canje { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.4rem; border-radius: 8px; cursor: pointer;
             border: 1px solid var(--rz-base-300); background: var(--rz-base-background-color); color: var(--rz-text-color); font-size: 0.85rem; }
.pos-canje img { width: 52px; height: 52px; object-fit: contain; }
.pos-canje small { color: var(--rz-primary); font-weight: 600; }
.pos-canje:disabled { opacity: 0.45; cursor: default; }
.pos-promos { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; font-size: 0.85rem; }
.pos-promos .rzi { color: var(--rz-warning); }
.pos-promo { padding: 0.1rem 0.5rem; border-radius: 10px; background: var(--rz-warning-lighter); color: var(--rz-text-color); }
.pos-gana { color: var(--rz-success); font-size: 0.9rem; }
.pos-linea-promo { color: var(--rz-success) !important; }
@media (max-width: 520px) {
    .pos-teclas { grid-template-columns: repeat(3, 1fr); }
}
/* grilla talle / color de un articulo matriz (PosMatriz, VEN_POS_MATRIZ) */
.pos-matriz-imagen { width: 72px; height: 72px; object-fit: contain; border-radius: 6px; }
.pos-matriz-marco { overflow: auto; max-height: 55vh; }
.pos-matriz { border-collapse: separate; border-spacing: 0.3rem; width: 100%; }
.pos-matriz th { font-size: 0.85rem; text-align: center; padding: 0.2rem 0.4rem; white-space: nowrap; }
.pos-matriz tbody th { text-align: left; }
.pos-matriz-celda { border: 1px solid var(--rz-primary); border-radius: 8px; padding: 0.5rem; text-align: center; cursor: pointer; min-width: 5.5rem;
    display: table-cell; background: var(--rz-primary-lighter); }
.pos-matriz-celda:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.18); }
.pos-matriz-celda b, .pos-matriz-celda small { display: block; }
.pos-matriz-celda small { color: var(--rz-text-secondary-color); font-size: 0.72rem; }
.pos-matriz-sin { background: var(--rz-base-100); border-color: var(--rz-base-300); opacity: 0.6; }
.pos-matriz-na { text-align: center; color: var(--rz-text-disabled-color); }
