@media (min-width: 768px) and (max-width: 1280px){
    .main-sidebar{
        width: 230px !important;
    }
    .content-wrapper,
    .main-footer{
        margin-left: 215px;
    }
    .main-header .navbar{
        margin-left: 230px;
    }
    body:not(.sidebar-collapse) .main-header .logo{
        width: 230px !important;
    }
    .user-panel2 .info{
        padding: 0 10px;
    }
    body:not(.sidebar-collapse) .main-sidebar .sidebar-menu{
        gap: 8px;
        padding: 14px 6px 18px;
    }
    body:not(.sidebar-collapse) .main-sidebar .sidebar-menu > li:not(.menu-grupo-abierto):not(.menu-regresar) > a,
    body:not(.sidebar-collapse) .main-sidebar .sidebar-menu > li.treeview > .treeview-menu > li > a{
        min-height: 104px;
        padding: 14px 2px 12px !important;
        border-radius: 14px;
        font-size: 11.5px;
    }
    body:not(.sidebar-collapse) .main-sidebar .sidebar-menu > li:not(.menu-grupo-abierto):not(.menu-regresar) > a > i,
    body:not(.sidebar-collapse) .main-sidebar .sidebar-menu > li.treeview > .treeview-menu > li > a > i{
        width: 50px;
        height: 50px;
        margin-bottom: 9px;
        font-size: 21px;
        line-height: 50px;
    }
    body:not(.sidebar-collapse) .main-sidebar .sidebar-menu > li:not(.menu-grupo-abierto):not(.menu-regresar) > a > .buttonSunatPeque,
    body:not(.sidebar-collapse) .main-sidebar .sidebar-menu > li.treeview > .treeview-menu > li > a > .buttonSunatPeque{
        background-size: 26px 24px !important;
    }
    body:not(.sidebar-collapse) .main-sidebar .sidebar-menu > li.treeview:not(.menu-grupo-abierto) > a::after{
        top: 10px;
        right: 11px;
        font-size: 11px;
    }
    body:not(.sidebar-collapse) .main-sidebar .sidebar-menu:not(.menu-dentro) > li.menu-directo + li.treeview,
    body:not(.sidebar-collapse) .main-sidebar .sidebar-menu:not(.menu-dentro) > li.menu-directo + li.treeview + li{
        margin-top: 16px;
    }
    body:not(.sidebar-collapse) .main-sidebar .sidebar-menu:not(.menu-dentro) > li.menu-directo + li.treeview::before{
        top: -13px;
    }
    body:not(.sidebar-collapse) .main-sidebar .sidebar-menu > li.menu-grupo-abierto > .treeview-menu{
        gap: 8px;
    }
    body:not(.sidebar-collapse) .main-sidebar .sidebar-menu > li.menu-grupo-abierto > a{
        margin-bottom: 10px;
        padding: 10px 12px !important;
        border-radius: 14px;
        font-size: 13.5px;
    }
    body:not(.sidebar-collapse) .main-sidebar .sidebar-menu > li.menu-grupo-abierto > a > i{
        font-size: 18px;
    }
    body:not(.sidebar-collapse) .main-sidebar .sidebar-menu > li.menu-regresar > a{
        padding: 12px 8px !important;
        border-radius: 14px;
        font-size: 13px;
    }
    body:not(.sidebar-collapse) .main-sidebar .sidebar-menu > li.menu-regresar > a > i{
        font-size: 14px;
    }
    .lista-doc .tabla-resumenes{
        overflow-x: auto;
    }
    .lista-doc .lista-doc-tabla .dropdown.open .dropdown-menu{
        position: absolute;
        float: none;
        min-width: 160px;
        margin-top: 4px;
    }
}

@media (min-width: 769px) and (max-width: 1280px){
    .list-categorias .categoria-item{
        height: 46px;
        padding: 4px 8px;
        font-size: 15px;
        font-weight: 700;
        line-height: 1.15;
        text-align: center;
    }
    .productos-pos .productos-pos-venta{
        width: 165px;
        height: 275px;
    }
    .productos-pos .productos-pos-venta .descripcion-pos{
        font-size: 16px !important;
        line-height: 1.2;
    }
    .productos-pos .productos-pos-venta .precio-uni-pos{
        font-size: 21px !important;
    }
    .teclado-container{
        gap: 8px;
        padding: 8px 10px;
    }
    .teclado-container .pantalla{
        flex: 0 0 96px;
        height: 54px;
        margin-right: 0;
        font-size: 24px;
    }
    .teclado-container .teclado{
        gap: 5px;
    }
    .teclado-container .teclado button{
        flex: 1 1 0;
        min-width: 0;
        height: 54px;
        padding: 0;
        border-radius: 10px;
        font-size: 26px;
    }
    .teclado-container .teclado .btn-borrar{
        flex: 1.6 1 0 !important;
    }
}

@media (min-width: 769px) and (max-width: 1100px) and (orientation: landscape){
    .teclado-container .teclado{
        flex-wrap: wrap;
    }
    .teclado-container .teclado button{
        flex: 0 0 calc((100% - 60px) / 7);
    }
    .teclado-container .teclado .btn-borrar{
        flex: 1 1 calc((100% - 60px) / 7) !important;
    }
    .teclado-container .pantalla{
        align-self: stretch;
        height: auto;
    }
}

@media (min-width: 769px) and (max-width: 1280px) and (orientation: landscape){
    .teclado-container .teclado{
        gap: 10px;
    }
}

@media (min-width: 1281px) and (max-width: 1600px) and (any-pointer: coarse){
    .row2{
        width: auto !important;
        float: none !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .list-categorias{
        padding-left: 0 !important;
        gap: 4px;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }
    .list-categorias .categoria-item{
        margin: 0;
        height: 60px;
        padding: 4px 6px;
        font-size: 19px;
        font-weight: 700;
        line-height: 1.1;
        overflow-wrap: anywhere;
    }
    #contenedorPosOp1 > .productos-pos{
        width: auto !important;
    }
    .productos-pos .productos-pos-venta{
        width: 155px;
        height: 210px;
    }
    .productos-pos .productos-pos-venta img.img-ps{
        height: 110px;
        object-fit: cover;
    }
    .productos-pos .productos-pos-venta .descripcion-pos{
        font-size: 16px !important;
        line-height: 1.2;
    }
    .productos-pos .productos-pos-venta .precio-uni-pos{
        font-size: 26px !important;
    }
    .teclado-container{
        float: none !important;
        width: auto !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 8px !important;
        margin: 0 64px 6px 8px !important;
        padding: 0 !important;
    }
    .teclado-container .pantalla{
        flex: 0 0 92px !important;
        width: 92px !important;
        height: 46px !important;
        margin: 0 !important;
        font-size: 24px !important;
    }
    .teclado-container .teclado{
        flex: 1 1 0 !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 4px !important;
        width: auto !important;
        min-width: 0;
        overflow: visible !important;
    }
    .teclado-container .teclado button{
        flex: 1 1 0 !important;
        width: auto !important;
        min-width: 0 !important;
        height: 46px !important;
        font-size: 22px !important;
        border-radius: 10px !important;
        padding: 0 !important;
    }
    .teclado-container .teclado .btn-borrar{
        flex: 1.5 1 0 !important;
    }
    .btn-pago{
        width: 88px !important;
        height: 58px !important;
        margin: 4px !important;
    }
    .btn-pago .texto-boton{
        font-size: 16px !important;
    }
    #formVentaPos .tabla-items thead{
        font-size: 14px !important;
    }
    #formVentaPos .tabla-items thead th{
        font-size: 15px !important;
    }
    #formVentaPos .tabla-items tbody td{
        font-size: 17px !important;
    }
    #formVentaPos .tabla-items tbody td.celda-descripcion-item{
        font-size: 17px !important;
    }
    #formVentaPos .cantidaditempos,
    #formVentaPos .preciounitariopos{
        height: 40px !important;
        font-size: 18px !important;
    }
    .btnGuardarVentaPos{
        width: 150px !important;
        height: 54px !important;
        line-height: 54px !important;
        font-size: 22px !important;
    }
}

#btnMostrarBusqueda{
    display: none;
}

@media (min-width: 769px) and (any-pointer: coarse){
    #contenedorPosOp1 .pos-col-buscar,
    #contenedorPosOp1 .pos-col-barras,
    #contenedorPosOp1 .pos-balanza-solo-pc{
        display: none !important;
    }
    #contenedorPosOp1.pos-busqueda-abierta .pos-col-buscar,
    #contenedorPosOp1.pos-busqueda-abierta .pos-col-barras,
    #contenedorPosOp1.pos-busqueda-abierta .pos-balanza-solo-pc{
        display: block !important;
    }
    #contenedorPosOp1{
        position: relative;
    }
    #contenedorPosOp1.pos-busqueda-abierta .pos-col-barras{
        padding-right: 60px !important;
    }
    #btnMostrarBusqueda{
        display: inline-block;
        position: absolute;
        top: 14px;
        right: 6px;
        flex: none;
        width: 48px;
        height: 48px;
        padding: 0;
        border: none;
        border-radius: 12px;
        background: #143DD4;
        color: #fff;
        font-size: 20px;
        line-height: 48px;
    }
    #btnMostrarProductos{
        display: none !important;
    }
}

@media (min-width: 769px) and (max-width: 1280px) and (any-pointer: coarse){
    .productos-pos .productos-pos-venta .descripcion-pos{
        font-size: 14px !important;
    }
}

@media (any-pointer: coarse){
    .productos-pos,
    .row2{
        touch-action: pan-y;
        overscroll-behavior: contain;
    }
    .productos-pos .paginador-pos[data-tpages]{
        position: sticky;
        bottom: 6px;
        z-index: 3;
        width: 100%;
        margin: 0;
        padding: 6px 0 0;
        pointer-events: none;
    }
    .productos-pos .paginador-pos[data-tpages] .pagination{
        display: none;
    }
    .productos-pos .paginador-pos[data-tpages]::after{
        content: attr(data-page) " / " attr(data-tpages);
        display: inline-block;
        padding: 4px 16px;
        border-radius: 999px;
        background: rgba(71, 103, 220, .92);
        box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
        color: #fff;
        font-size: 14px;
        font-weight: 700;
        letter-spacing: .5px;
        line-height: 1.3;
    }
    .productos-pos .paginador-pos[data-tpages="1"],
    .productos-pos .paginador-pos[data-tpages="0"]{
        display: none;
    }
}

@media (any-pointer: coarse) and (min-width: 769px){
    .productos-pos > p:empty{
        display: none;
    }
    .productos-pos .paginador-pos[data-tpages]{
        height: 0;
        padding: 0;
        overflow: visible;
    }
    .productos-pos .paginador-pos[data-tpages]::after{
        position: absolute;
        right: 8px;
        bottom: 0;
        padding: 3px 12px;
        font-size: 13px;
    }
}

@media (any-pointer: coarse){
    .pos-pagina-arrastre{
        transition: none;
    }
    .pos-pagina-vuelve{
        transition: transform .18s ease, opacity .18s ease;
    }
    .pos-pagina-cargando{
        opacity: .45;
    }
    .pos-pagina-entra-izq{
        animation: pos-pagina-entra-izq .22s ease-out;
    }
    .pos-pagina-entra-der{
        animation: pos-pagina-entra-der .22s ease-out;
    }
}

@keyframes pos-pagina-entra-izq{
    from{ transform: translateX(48px); opacity: 0; }
    to{ transform: translateX(0); opacity: 1; }
}

@keyframes pos-pagina-entra-der{
    from{ transform: translateX(-48px); opacity: 0; }
    to{ transform: translateX(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce){
    .pos-pagina-entra-izq,
    .pos-pagina-entra-der{
        animation: none;
    }
    .pos-pagina-vuelve{
        transition: none;
    }
}

@media (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) and (any-pointer: coarse){
    #contenedorPosOp1:has(> .teclado-container:not([style*="none"])){
        display: flex;
        flex-direction: column;
        height: calc(var(--pos-alto-vp, 100dvh) - 38px);
    }
    #contenedorPosOp1:has(> .teclado-container:not([style*="none"])) > .row2{
        flex: none;
        width: auto !important;
        margin-right: 60px !important;
    }
    #contenedorPosOp1:has(> .teclado-container:not([style*="none"])) > .productos-pos{
        flex: 0 1 636px;
        height: auto;
        min-height: 0;
    }
    #contenedorPosOp1 > .teclado-container:not([style*="none"]){
        order: 9;
        position: relative;
        flex: 1 1 274px;
        min-height: 274px;
        max-height: 480px;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(5, minmax(0, 1fr));
        align-items: stretch;
        gap: 6px;
        width: min(100%, 400px);
        margin: 6px auto 0;
        padding: 0;
    }
    #contenedorPosOp1 > .teclado-container:not([style*="none"]) .teclado{
        display: contents;
    }
    #contenedorPosOp1 > .teclado-container:not([style*="none"]) .pantalla{
        order: 0;
        grid-column: span 2;
        flex: none;
        width: auto;
        height: auto;
        margin: 0;
        font-size: 28px;
    }
    #contenedorPosOp1 > .teclado-container:not([style*="none"]) .teclado button{
        flex: none !important;
        width: auto;
        min-width: 0;
        height: auto;
        padding: 0;
        border-radius: 12px;
        font-size: 26px;
    }
    #contenedorPosOp1 > .teclado-container:not([style*="none"]) .teclado .btn-borrar{
        order: 1;
    }
    #contenedorPosOp1 > .teclado-container:not([style*="none"]) .teclado button:nth-child(7){ order: 2; }
    #contenedorPosOp1 > .teclado-container:not([style*="none"]) .teclado button:nth-child(8){ order: 3; }
    #contenedorPosOp1 > .teclado-container:not([style*="none"]) .teclado button:nth-child(9){ order: 4; }
    #contenedorPosOp1 > .teclado-container:not([style*="none"]) .teclado button:nth-child(4){ order: 5; }
    #contenedorPosOp1 > .teclado-container:not([style*="none"]) .teclado button:nth-child(5){ order: 6; }
    #contenedorPosOp1 > .teclado-container:not([style*="none"]) .teclado button:nth-child(6){ order: 7; }
    #contenedorPosOp1 > .teclado-container:not([style*="none"]) .teclado button:nth-child(1){ order: 8; }
    #contenedorPosOp1 > .teclado-container:not([style*="none"]) .teclado button:nth-child(2){ order: 9; }
    #contenedorPosOp1 > .teclado-container:not([style*="none"]) .teclado button:nth-child(3){ order: 10; }
    #contenedorPosOp1 > .teclado-container:not([style*="none"]) .teclado button:nth-child(10){ order: 11; }
    #contenedorPosOp1 > .teclado-container:not([style*="none"]) .teclado button:nth-child(11){ order: 12; }
    #contenedorPosOp1 > .teclado-container:not([style*="none"]) .teclado button:nth-child(12){ order: 13; }
    #contenedorPosOp1:has(> .teclado-container:not([style*="none"])) .productos-pos .paginador-pos[data-tpages]::after{
        display: none;
    }
    #contenedorPosOp1 > .teclado-container:not([style*="none"])[data-pagina]::after{
        content: attr(data-pagina);
        position: absolute;
        right: calc(100% + 24px);
        bottom: 0;
        white-space: nowrap;
        padding: 4px 16px;
        border-radius: 999px;
        background: rgba(15, 42, 158, .92);
        box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
        color: #fff;
        font-size: 14px;
        font-weight: 700;
        letter-spacing: .5px;
        line-height: 1.3;
        pointer-events: none;
    }
}
