/*
 * Tablet-only fluid layer.
 *
 * Phones (<= 680px) and pointer-based desktop layouts remain outside this
 * media query. The first branch also keeps browser previews between 681px and
 * 820px accurate even when the preview cannot expose a coarse pointer.
 */
html body #pvf-shell #pv-modal-importar-inv .pv-importador-tablet-cancel {
    display: none !important;
}

/* Inventario > Movimientos: la tablet reutiliza la vista enriquecida de
   movil, pero aprovecha su ancho con un resumen horizontal y dos tarjetas
   por fila. Escritorio y telefono conservan sus composiciones actuales. */
@media (min-width:681px) and (max-width:820px),
       (min-width:821px) and (max-width:1366px) and (pointer:coarse) and (min-height:500px),
       (min-width:821px) and (max-width:1366px) and (hover:none) and (min-height:500px) {
    html body #pvf-shell .pvf-main-body.pvf-view-inventario .rv-inv-desktop-render:has(#pv-hist-mov-inv-card-desktop) {
        display: none !important;
    }

    html body #pvf-shell .pvf-main-body.pvf-view-inventario .rv-inv-mobile-render:has(.rv-mov-module) {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    html body #pvf-shell .pvf-main-body .rv-mov-module {
        gap: 14px !important;
    }

    html body #pvf-shell .pvf-main-body .rv-mov-hero {
        display: grid !important;
        grid-template-columns: 48px minmax(220px, 1fr) minmax(250px, .9fr) !important;
        grid-template-rows: auto !important;
        align-items: center !important;
        gap: 14px !important;
        padding: 16px 18px !important;
        border-radius: 20px !important;
    }

    html body #pvf-shell .pvf-main-body .rv-mov-hero-icon {
        grid-column: 1 !important;
        grid-row: 1 !important;
        width: 48px !important;
        height: 48px !important;
        border-radius: 14px !important;
    }

    html body #pvf-shell .pvf-main-body .rv-mov-hero-copy {
        grid-column: 2 !important;
        grid-row: 1 !important;
        min-width: 0 !important;
    }

    html body #pvf-shell .pvf-main-body .rv-mov-hero-copy > small {
        font-size: 8px !important;
    }

    html body #pvf-shell .pvf-main-body .rv-mov-hero-copy h2 {
        font-size: 18px !important;
    }

    html body #pvf-shell .pvf-main-body .rv-mov-hero-copy p {
        font-size: 10px !important;
    }

    html body #pvf-shell .pvf-main-body .rv-mov-hero-stats {
        grid-column: 3 !important;
        grid-row: 1 !important;
        align-self: center !important;
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 7px !important;
        width: 100% !important;
    }

    html body #pvf-shell .pvf-main-body .rv-mov-hero-stats > span {
        min-height: 46px !important;
        padding: 7px 4px !important;
        border-radius: 12px !important;
    }

    html body #pvf-shell .pvf-main-body .rv-mov-hero-stats strong {
        font-size: 15px !important;
    }

    html body #pvf-shell .pvf-main-body .rv-mov-hero-stats small {
        font-size: 7px !important;
    }

    html body #pvf-shell .pvf-main-body .rv-mov-toolbar {
        display: grid !important;
        grid-template-columns: minmax(220px, 1fr) minmax(300px, .95fr) !important;
        align-items: center !important;
        gap: 16px !important;
        margin: 0 0 12px !important;
        padding: 14px 16px !important;
        border-radius: 18px !important;
    }

    html body #pvf-shell .pvf-main-body .rv-mov-toolbar-copy h2 {
        font-size: 17px !important;
    }

    html body #pvf-shell .pvf-main-body .rv-mov-toolbar-copy p {
        font-size: 9px !important;
    }

    html body #pvf-shell .pvf-main-body .rv-mov-search .pv-historial-buscar-input {
        height: 46px !important;
        min-height: 46px !important;
        padding-right: 14px !important;
        font-size: 11px !important;
    }

    html body #pvf-shell .pvf-main-body #pv-hist-mov-inv {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
        align-items: stretch !important;
    }

    html body #pvf-shell .pvf-main-body #pv-hist-mov-inv .rv-mov-table-row:not(.pv-historial-header) {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        grid-template-areas:
            "tipo fecha"
            "producto producto"
            "almacen cantidad"
            "motivo motivo"
            "acciones acciones" !important;
        align-content: start !important;
        gap: 10px !important;
        min-height: 300px !important;
        padding: 14px 14px 12px 17px !important;
        border-radius: 18px !important;
        box-shadow: 0 9px 24px rgba(27, 34, 55, .07) !important;
    }

    html body #pvf-shell .pvf-main-body #pv-hist-mov-inv .rv-mov-product strong {
        font-size: 13px !important;
    }

    html body #pvf-shell .pvf-main-body #pv-hist-mov-inv .rv-mov-warehouse,
    html body #pvf-shell .pvf-main-body #pv-hist-mov-inv .rv-mov-quantity {
        min-height: 60px !important;
    }

    html body #pvf-shell .pvf-main-body #pv-hist-mov-inv .rv-mov-warehouse {
        grid-template-columns: minmax(0, 1fr) !important;
        align-content: center !important;
        padding: 9px !important;
    }

    html body #pvf-shell .pvf-main-body #pv-hist-mov-inv .rv-mov-warehouse .rv-mov-metric-icon {
        display: none !important;
    }

    html body #pvf-shell .pvf-main-body #pv-hist-mov-inv .rv-mov-warehouse > span:last-child {
        grid-column: 1 !important;
        display: flex !important;
        align-items: flex-start !important;
        flex-direction: column !important;
        gap: 4px !important;
    }

    html body #pvf-shell .pvf-main-body #pv-hist-mov-inv .rv-mov-warehouse strong,
    html body #pvf-shell .pvf-main-body #pv-hist-mov-inv .rv-mov-impact-copy strong {
        font-size: 10px !important;
    }

    html body #pvf-shell .pvf-main-body #pv-hist-mov-inv .rv-mov-reason strong {
        font-size: 9.5px !important;
    }

    html body #pvf-shell .pvf-main-body #pv-hist-mov-inv .rv-mov-actions {
        align-self: end !important;
    }

    html body #pvf-shell .pvf-main-body #pv-hist-mov-inv .rv-mov-delete-label {
        font-size: 9px !important;
    }

    html body #pvf-shell .pvf-main-body #pv-hist-mov-inv-card .pv-paginacion {
        max-width: 420px !important;
        margin: 14px auto 0 !important;
    }
}

@media (min-width:681px) and (max-width:820px),
       (min-width:821px) and (max-width:1366px) and (pointer:coarse) and (min-height:500px),
       (min-width:821px) and (max-width:1366px) and (hover:none) and (min-height:500px) {
    html body #pvf-shell {
        --pv-tablet-fluid-gap: clamp(10px, 1.35vw, 20px);
        --pv-tablet-card-min: clamp(190px, 23vw, 280px);
        --pv-tablet-wide-card-min: clamp(220px, 25vw, 310px);
        --pv-tablet-control-height: clamp(42px, 4.8vw, 48px);
    }

    html body #pvf-shell .pvf-main-body,
    html body #pvf-shell .pvf-main-body > *,
    html body #pvf-shell .pvf-card {
        box-sizing: border-box;
        min-width: 0;
        max-width: 100%;
    }

    html body #pvf-shell :where(
        .pv-pedido-cards-grid,
        .pv-pedido-grid
    ) {
        grid-template-columns: repeat(
            auto-fill,
            minmax(min(100%, var(--pv-tablet-card-min)), 1fr)
        ) !important;
        gap: var(--pv-tablet-fluid-gap) !important;
    }

    html body #pvf-shell :where(
        .rv-dash-kpis,
        .rv-utilidad-kpis,
        .pv-est-kpis
    ) {
        grid-template-columns: repeat(
            auto-fit,
            minmax(min(100%, var(--pv-tablet-card-min)), 1fr)
        ) !important;
        gap: var(--pv-tablet-fluid-gap) !important;
    }

    html body #pvf-shell :where(
        .pv-saldos-grid,
        .pv-bancos-grid,
        .rv-users-list,
        .pv-ms-assignment-grid
    ) {
        grid-template-columns: repeat(
            auto-fit,
            minmax(min(100%, var(--pv-tablet-wide-card-min)), 1fr)
        ) !important;
        gap: var(--pv-tablet-fluid-gap) !important;
    }

    html body #pvf-shell :where(
        input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
        select,
        .pv-cs-trigger,
        .pv-combo-trigger
    ) {
        max-width: 100%;
    }

    html body #pvf-shell :where(
        .pv-pedido-card,
        .rv-kpi-card,
        .pv-est-kpi,
        .pv-banco-card,
        .pv-saldo-card
    ) {
        width: 100%;
        min-width: 0;
    }

    html body #pvf-shell :where(
        .pv-pedido-card-nombre,
        .rv-kpi-label,
        .pv-est-kpi-copy,
        .pv-banco-card-copy,
        .pv-saldo-card-copy
    ) {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    html body #pvf-shell :where(img, video, canvas, svg) {
        max-width: 100%;
    }

    /* Pedidos: en tablet la barra conserva el buscador arriba y agrupa todos
       los controles restantes en una sola fila. El telefono y el escritorio
       mantienen sus composiciones propias fuera de esta media query. */
    html body #pvf-shell #pv-pedido-form .pv-pos-topbar {
        display: grid !important;
        grid-template-columns:
            minmax(120px, 1.35fr)
            minmax(110px, 1.1fr)
            minmax(82px, .75fr)
            minmax(90px, .85fr)
            44px
            44px !important;
        gap: 8px !important;
        align-items: stretch !important;
    }

    html body #pvf-shell #pv-pedido-form .pv-pos-topbar > * {
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    html body #pvf-shell #pv-pedido-form .pv-pos-topbar .pv-pos-search-wrap {
        grid-column: 1 / -1 !important;
        grid-row: 1 !important;
        width: 100% !important;
    }

    html body #pvf-shell #pv-pedido-form .pv-pos-topbar .pv-mini-select-wrap {
        grid-column: 1 !important;
        grid-row: 2 !important;
        width: 100% !important;
    }

    html body #pvf-shell #pv-pedido-form .pv-pos-topbar .pv-mini-select-combo {
        grid-column: 2 !important;
        grid-row: 2 !important;
        width: 100% !important;
    }

    html body #pvf-shell #pv-pedido-form .pv-pos-topbar .pv-ajuste-wrap {
        grid-column: 3 !important;
        grid-row: 2 !important;
        width: 100% !important;
    }

    html body #pvf-shell #pv-pedido-form .pv-pos-topbar > .pv-divisa-menu-btn {
        grid-column: 4 !important;
        grid-row: 2 !important;
        width: 100% !important;
    }

    html body #pvf-shell #pv-pedido-form .pv-pos-topbar .pv-personalizar-wrap {
        grid-column: 5 !important;
        grid-row: 2 !important;
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        height: 44px !important;
    }

    html body #pvf-shell #pv-pedido-form .pv-pos-topbar #pv-pedido-vista-toggle.pv-vista-toggle {
        display: inline-flex !important;
        grid-column: 6 !important;
        grid-row: 2 !important;
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        height: 44px !important;
    }

    /* Pedidos: la tablet reutiliza el flujo aprobado del telefono. Agregar un
       producto muestra la barra del carrito; desde ella se abre el cajon con
       cliente, forma de pago y acciones, sin empujar el catalogo hacia abajo. */
    html body #pvf-shell #pv-pedido-form {
        padding-bottom: 154px !important;
    }

    html body #pvf-shell #pv-pedido-form .pv-pedido-col-resumen.pv-pedido-carrito-flotante {
        position: fixed !important;
        inset: 0 0 0 auto !important;
        z-index: 1850 !important;
        box-sizing: border-box !important;
        width: min(92vw, 430px) !important;
        max-width: 430px !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        margin: 0 !important;
        padding: 10px 12px calc(20px + env(safe-area-inset-bottom, 0px)) !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: contain !important;
        -webkit-overflow-scrolling: touch !important;
        border: 0 !important;
        border-left: 1px solid #E4E8F0 !important;
        border-radius: 20px 0 0 20px !important;
        background: linear-gradient(180deg, #FFFFFF 0%, #FBFCFF 52%, #F7F9FD 100%) !important;
        box-shadow: -18px 0 46px rgba(24, 30, 48, .22) !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transform: translateX(104%) !important;
        transition: transform .24s cubic-bezier(.22, .8, .28, 1), opacity .18s ease !important;
    }

    html body #pvf-shell #pv-pedido-form .pv-pedido-col-resumen.pv-pedido-carrito-flotante.pv-pedido-sheet-open {
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: translateX(0) !important;
    }

    html body #pvf-shell #pv-pedido-form .pv-pedido-sheet-head {
        position: sticky !important;
        top: -10px !important;
        z-index: 12 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        min-height: 52px !important;
        margin: 0 -12px 10px !important;
        padding: 6px 54px !important;
        border-bottom: 1px solid #E4E8F0 !important;
        border-radius: 20px 0 0 0 !important;
        background: #FFFFFF !important;
    }

    html body #pvf-shell #pv-pedido-form .pv-pedido-sheet-title {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 2px !important;
    }

    html body #pvf-shell #pv-pedido-form .pv-pedido-sheet-close {
        position: absolute !important;
        top: 8px !important;
        right: 12px !important;
        display: grid !important;
        place-items: center !important;
        width: 36px !important;
        min-width: 36px !important;
        height: 36px !important;
        min-height: 36px !important;
        padding: 0 !important;
        border: 1px solid #DDE2EC !important;
        border-radius: 10px !important;
        background: #FAFBFD !important;
        color: #6844DF !important;
        font-size: 22px !important;
    }

    html body #pvf-shell #pv-pedido-form .pv-pedido-col-resumen .pv-pedido-acciones-fila {
        position: static !important;
        inset: auto !important;
        z-index: auto !important;
        margin: 16px 0 0 !important;
        padding: 12px 0 calc(4px + env(safe-area-inset-bottom, 0px)) !important;
        border-top: 1px solid #E3E7EF !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    html body #pv-pedido-sheet-backdrop {
        position: fixed !important;
        inset: 0 !important;
        z-index: 1840 !important;
        display: block !important;
        background: rgba(27, 30, 43, .24) !important;
        opacity: 0 !important;
        pointer-events: none !important;
        backdrop-filter: blur(3px) !important;
        -webkit-backdrop-filter: blur(3px) !important;
        transition: opacity .2s ease !important;
    }

    html body #pv-pedido-sheet-backdrop.pv-pedido-sheet-open {
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    html body .pv-pedido-cart-fab {
        position: fixed !important;
        right: 16px !important;
        bottom: calc(82px + env(safe-area-inset-bottom, 0px)) !important;
        left: auto !important;
        z-index: 1830 !important;
        box-sizing: border-box !important;
        display: grid !important;
        grid-template-columns: 40px minmax(0, 1fr) auto !important;
        align-items: center !important;
        gap: 9px !important;
        width: min(430px, calc(100vw - 32px)) !important;
        height: 70px !important;
        min-height: 70px !important;
        padding: 8px 9px !important;
        border: 1px solid #E1E5EE !important;
        border-radius: 15px !important;
        background: #FFFFFF !important;
        color: #171D31 !important;
        box-shadow: 0 12px 32px rgba(29, 35, 62, .18) !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transform: translateY(18px) !important;
        transition: transform .22s ease, opacity .18s ease !important;
    }

    html body .pv-pedido-cart-fab.pv-pedido-cart-fab-show {
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: translateY(0) !important;
    }

    /* Inventario > Movimientos: en tablet el formulario se presenta como un
       cuadro centrado, con aire alrededor y acciones realmente simetricas. */
    html body #pvf-shell #pv-modal-movimiento-inv {
        box-sizing: border-box !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 32px !important;
    }

    html body #pvf-shell #pv-modal-movimiento-inv .pv-mov-modal {
        width: min(680px, calc(100vw - 64px)) !important;
        max-width: 680px !important;
        height: min(640px, 88vh) !important;
        max-height: none !important;
        margin: auto !important;
        border-radius: 22px !important;
    }

    html body #pvf-shell #pv-modal-movimiento-inv .pv-mov-field > :where(
        .pv-cs,
        input,
        textarea,
        select
    ) {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    html body #pvf-shell #pv-modal-movimiento-inv .pv-mov-actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        gap: 12px !important;
        width: 100% !important;
        padding: 12px 18px 14px !important;
    }

    html body #pvf-shell #pv-modal-movimiento-inv .pv-mov-actions > .pv-mov-cancel,
    html body #pvf-shell #pv-modal-movimiento-inv .pv-mov-actions > .pv-mov-submit {
        flex: none !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        padding-inline: 12px !important;
    }

    /* Inventario > Ingreso: replica en tablet el encuadre, los controles a
       ancho completo y las acciones simetricas del modal de movimiento. */
    html body #pvf-shell #pv-modal-reponer-inv {
        box-sizing: border-box !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 32px !important;
    }

    html body #pvf-shell #pv-modal-reponer-inv .pv-rep-modal {
        width: min(680px, calc(100vw - 64px)) !important;
        max-width: 680px !important;
        height: min(640px, 88vh) !important;
        max-height: none !important;
        margin: auto !important;
        border-radius: 22px !important;
    }

    html body #pvf-shell #pv-modal-reponer-inv .pv-rep-field > :where(
        .pv-cs,
        .pv-rep-fecha-mobile,
        input,
        textarea,
        select
    ) {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    html body #pvf-shell #pv-modal-reponer-inv .pv-rep-actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        gap: 12px !important;
        width: 100% !important;
        padding: 12px 18px 14px !important;
    }

    html body #pvf-shell #pv-modal-reponer-inv .pv-rep-actions > .pv-rep-cancel,
    html body #pvf-shell #pv-modal-reponer-inv .pv-rep-actions > .pv-rep-submit {
        flex: none !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        padding-inline: 12px !important;
    }

    /* Inventario > Importar: aplica el formato modal tablet Noalyx. El
       cuadro queda centrado y compacto, los controles usan todo el ancho y
       las acciones se reparten en dos mitades iguales. */
    html body #pvf-shell #pv-modal-importar-inv {
        box-sizing: border-box !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 32px !important;
    }

    html body #pvf-shell #pv-modal-importar-inv .pv-importador-modal,
    html body #pvf-shell #pv-modal-importar-inv .pv-importador-modal:has(.pv-ocr-results:not([hidden])) {
        box-sizing: border-box !important;
        width: min(680px, calc(100vw - 64px)) !important;
        max-width: 680px !important;
        height: min(640px, 88vh) !important;
        margin: auto !important;
        border-radius: 22px !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior: contain !important;
    }

    html body #pvf-shell #pv-modal-importar-inv :where(
        .pv-importador-form,
        .pv-importador-field,
        .pv-importador-file,
        .pv-file-input,
        .pv-importador-settings,
        .pv-importador-settings > .pvf-row,
        .pv-importador-settings .pv-cs,
        .pv-importador-settings .pv-cs-trigger,
        .pv-importador-settings .pv-divisa-chips,
        .pv-ocr-settings,
        input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
        select,
        textarea
    ) {
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    html body #pvf-shell #pv-modal-importar-inv .pv-importador-settings {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    html body #pvf-shell #pv-modal-importar-inv .pv-importador-footer:not(.pv-ocr-results-footer) {
        position: sticky !important;
        z-index: 8 !important;
        bottom: -21px !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        align-items: stretch !important;
        gap: 10px 12px !important;
        box-sizing: border-box !important;
        width: auto !important;
        margin: 19px -16px -21px !important;
        padding: 11px 16px 14px !important;
        border-top: 1px solid #E8E5F0 !important;
        background: #FFFFFF !important;
        box-shadow: 0 -8px 18px rgba(23, 32, 51, .05) !important;
    }

    html body #pvf-shell #pv-modal-importar-inv .pv-importador-footer:not(.pv-ocr-results-footer) > p {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        max-width: none !important;
    }

    html body #pvf-shell #pv-modal-importar-inv .pv-importador-tablet-cancel,
    html body #pvf-shell #pv-modal-importar-inv .pv-importador-footer:not(.pv-ocr-results-footer) > .pv-importador-primary {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        height: 48px !important;
        min-height: 48px !important;
        margin: 0 !important;
        padding: 0 12px !important;
        border-radius: 12px !important;
        font-size: 11.5px !important;
        font-weight: 850 !important;
        line-height: 1 !important;
        text-decoration: none !important;
    }

    html body #pvf-shell #pv-modal-importar-inv .pv-importador-tablet-cancel {
        grid-column: 1 !important;
        border: 1px solid #D9DDEA !important;
        background: #FFFFFF !important;
        color: #5D687E !important;
        box-shadow: none !important;
    }

    html body #pvf-shell #pv-modal-importar-inv .pv-importador-footer:not(.pv-ocr-results-footer) > .pv-importador-primary {
        grid-column: 2 !important;
    }

    /* Inventario > Categorias/Almacenes: el formulario inline adopta el
       encuadre compacto del formato modal tablet Noalyx. Al tener una sola
       accion, el boton usa todo el ancho disponible. */
    html body #pvf-shell .pvf-main-body .rv-warehouse-create-card {
        box-sizing: border-box !important;
        width: min(680px, calc(100vw - 64px)) !important;
        max-width: 680px !important;
        height: auto !important;
        margin-right: auto !important;
        margin-left: auto !important;
        overflow: hidden !important;
        border-radius: 22px !important;
        box-shadow: 0 18px 42px rgba(31, 39, 68, .11) !important;
    }

    html body #pvf-shell .pvf-main-body .rv-warehouse-create-card .rv-cat-create-head {
        border-radius: 22px 22px 0 0 !important;
    }

    html body #pvf-shell .pvf-main-body .rv-warehouse-create-card > form,
    html body #pvf-shell .pvf-main-body .rv-warehouse-create-form,
    html body #pvf-shell .pvf-main-body .rv-warehouse-create-form > .pvf-row,
    html body #pvf-shell .pvf-main-body .rv-warehouse-create-form input[type="text"] {
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    html body #pvf-shell .pvf-main-body .rv-warehouse-create-form {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    html body #pvf-shell .pvf-main-body .rv-warehouse-create-action {
        grid-column: 1 / -1 !important;
        margin-top: 4px !important;
        padding-top: 12px !important;
        border-top: 1px solid #E8EAF1 !important;
    }

    html body #pvf-shell .pvf-main-body .rv-warehouse-create-action > label {
        display: none !important;
    }

    html body #pvf-shell .pvf-main-body .rv-warehouse-create-card .rv-warehouse-create-action > .rv-cat-submit-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        height: 48px !important;
        min-height: 48px !important;
        margin: 0 !important;
        padding: 0 14px !important;
        border: 0 !important;
        border-radius: 12px !important;
        background: linear-gradient(105deg, #08A6EC 0%, #7042ED 58%, #D91A76 100%) !important;
        color: #FFFFFF !important;
        -webkit-text-fill-color: #FFFFFF !important;
        text-shadow: 0 1px 1px rgba(32, 20, 88, .16) !important;
        box-shadow: 0 10px 22px rgba(80, 75, 214, .24) !important;
        font-size: 11.5px !important;
        font-weight: 850 !important;
        line-height: 1 !important;
        opacity: 1 !important;
    }

    /* Inventario > Categorias/Almacenes: Nueva categoria usa el mismo
       formato modal tablet, sin afectar los formularios de edicion. */
    html body #pvf-shell .pvf-main-body .rv-cat-create-card:not(:has(input[name="categoria_id"])) {
        box-sizing: border-box !important;
        width: min(680px, calc(100vw - 64px)) !important;
        max-width: 680px !important;
        height: auto !important;
        margin-right: auto !important;
        margin-left: auto !important;
        overflow: hidden !important;
        border-radius: 22px !important;
        box-shadow: 0 18px 42px rgba(31, 39, 68, .11) !important;
    }

    html body #pvf-shell .pvf-main-body .rv-cat-create-card:not(:has(input[name="categoria_id"])) .rv-cat-create-head {
        border-radius: 22px 22px 0 0 !important;
    }

    html body #pvf-shell .pvf-main-body .rv-cat-create-card:not(:has(input[name="categoria_id"])) > form,
    html body #pvf-shell .pvf-main-body .rv-cat-create-card:not(:has(input[name="categoria_id"])) .rv-cat-create-form,
    html body #pvf-shell .pvf-main-body .rv-cat-create-card:not(:has(input[name="categoria_id"])) .rv-cat-create-form > .pvf-row,
    html body #pvf-shell .pvf-main-body .rv-cat-create-card:not(:has(input[name="categoria_id"])) .rv-cat-create-form input[type="text"],
    html body #pvf-shell .pvf-main-body .rv-cat-create-card:not(:has(input[name="categoria_id"])) .rv-cat-color-field .pv-color-picker,
    html body #pvf-shell .pvf-main-body .rv-cat-create-card:not(:has(input[name="categoria_id"])) .rv-cat-color-field .pv-color-picker-trigger,
    html body #pvf-shell .pvf-main-body .rv-cat-create-card:not(:has(input[name="categoria_id"])) .rv-cat-warehouse-field .pv-cs,
    html body #pvf-shell .pvf-main-body .rv-cat-create-card:not(:has(input[name="categoria_id"])) .rv-cat-warehouse-field .pv-cs-trigger {
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    html body #pvf-shell .pvf-main-body .rv-cat-create-card:not(:has(input[name="categoria_id"])) .rv-cat-create-form {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    html body #pvf-shell .pvf-main-body .rv-cat-create-card:not(:has(input[name="categoria_id"])) :where(
        .rv-cat-name-field,
        .rv-cat-color-field,
        .rv-cat-warehouse-field,
        .rv-cat-submit-field
    ) {
        grid-column: 1 / -1 !important;
        grid-row: auto !important;
    }

    html body #pvf-shell .pvf-main-body .rv-cat-create-card:not(:has(input[name="categoria_id"])) .rv-cat-submit-field {
        margin-top: 4px !important;
        padding-top: 12px !important;
        border-top: 1px solid #E8EAF1 !important;
    }

    html body #pvf-shell .pvf-main-body .rv-cat-create-card:not(:has(input[name="categoria_id"])) .rv-cat-submit-field > label {
        display: none !important;
    }

    html body #pvf-shell .pvf-main-body .rv-cat-create-card:not(:has(input[name="categoria_id"])) .rv-cat-form-actions,
    html body #pvf-shell .pvf-main-body .rv-cat-create-card:not(:has(input[name="categoria_id"])) .rv-cat-form-actions > .rv-cat-submit-btn {
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    html body #pvf-shell .pvf-main-body .rv-cat-create-card:not(:has(input[name="categoria_id"])) .rv-cat-form-actions > .rv-cat-submit-btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        height: 48px !important;
        min-height: 48px !important;
        margin: 0 !important;
        padding: 0 14px !important;
        border: 0 !important;
        border-radius: 12px !important;
        background: linear-gradient(105deg, #7042ED 0%, #A52BBA 58%, #E31761 100%) !important;
        color: #FFFFFF !important;
        -webkit-text-fill-color: #FFFFFF !important;
        text-shadow: 0 1px 1px rgba(32, 20, 88, .16) !important;
        box-shadow: 0 10px 22px rgba(112, 66, 237, .24) !important;
        font-size: 11.5px !important;
        font-weight: 850 !important;
        line-height: 1 !important;
        opacity: 1 !important;
    }

    html body #pvf-shell .pvf-main-body .rv-cat-create-card:not(:has(input[name="categoria_id"])) .rv-cat-form-actions > .rv-cat-submit-btn > span {
        color: #FFFFFF !important;
        -webkit-text-fill-color: #FFFFFF !important;
    }

    html body #pvf-shell .pvf-main-body .rv-cat-create-card:not(:has(input[name="categoria_id"])) .rv-cat-submit-icon {
        border-color: rgba(255, 255, 255, .62) !important;
        background: rgba(255, 255, 255, .18) !important;
        color: #FFFFFF !important;
    }

    html body #pvf-shell .pvf-main-body .rv-cat-create-card:not(:has(input[name="categoria_id"])) .rv-cat-submit-icon svg,
    html body #pvf-shell .pvf-main-body .rv-cat-create-card:not(:has(input[name="categoria_id"])) .rv-cat-submit-icon svg * {
        fill: none !important;
        stroke: #FFFFFF !important;
    }

    /* Inventario > Productos: en tablet se conserva un solo acceso a
       Importar (el superior) y se integra Imprimir en la fila principal de
       acciones junto a Producto, Movimiento e Ingreso. */
    html body #pvf-shell #pv-moneda-scope > .rv-inv-toolbar-row {
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        grid-template-rows: 46px !important;
        align-items: stretch !important;
        gap: 10px !important;
        width: 100% !important;
        min-height: 46px !important;
        margin-bottom: 14px !important;
        padding-top: 0 !important;
    }

    html body #pvf-shell #pv-moneda-scope > .rv-inv-toolbar-row > .rv-inv-smart-import-mobile {
        display: none !important;
    }

    html body #pvf-shell #pv-moneda-scope > .rv-inv-toolbar-row > .rv-inv-acciones-row {
        grid-column: 1 / 4 !important;
        grid-row: 1 !important;
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        align-items: stretch !important;
        gap: 10px !important;
        width: 100% !important;
        min-width: 0 !important;
        height: 46px !important;
        margin: 0 !important;
    }

    html body #pvf-shell #pv-moneda-scope > .rv-inv-toolbar-row > .rv-inv-acciones-row > button {
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        height: 46px !important;
        min-height: 46px !important;
        max-height: 46px !important;
        margin: 0 !important;
    }

    html body #pvf-shell #pv-moneda-scope > .rv-inv-toolbar-row > .rv-inv-imprimir-row {
        grid-column: 4 !important;
        grid-row: 1 !important;
        display: block !important;
        align-self: stretch !important;
        justify-self: stretch !important;
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        height: 46px !important;
        min-height: 46px !important;
        margin: 0 !important;
    }

    html body #pvf-shell #pv-moneda-scope > .rv-inv-toolbar-row > .rv-inv-imprimir-row .rv-inv-print-wrap,
    html body #pvf-shell #pv-moneda-scope > .rv-inv-toolbar-row > .rv-inv-imprimir-row .rv-inv-print-toggle {
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        height: 46px !important;
        min-height: 46px !important;
        margin: 0 !important;
    }

    /* Inventario: el menu Imprimir/PDF debe nacer del propio boton y no del
       centro de toda la barra de acciones. */
    html body #pvf-shell #pv-moneda-scope .rv-inv-toolbar-row .rv-inv-print-wrap {
        position: relative !important;
        z-index: 1450 !important;
    }

    html body #pvf-shell #pv-moneda-scope .rv-inv-toolbar-row .rv-inv-print-panel {
        top: calc(100% + 9px) !important;
        right: 0 !important;
        left: auto !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        align-items: stretch !important;
        box-sizing: border-box !important;
        width: min(280px, calc(100vw - 48px)) !important;
        min-width: 0 !important;
        max-width: calc(100vw - 48px) !important;
        transform: none !important;
    }

    html body #pvf-shell #pv-moneda-scope .rv-inv-toolbar-row .rv-inv-print-panel::before {
        right: 35px !important;
        left: auto !important;
    }

    html body #pvf-shell #pv-moneda-scope .rv-inv-toolbar-row .rv-inv-print-panel > :where(button, a) {
        box-sizing: border-box !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        padding-inline: 10px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    html body .pv-pedido-cart-fab-icon {
        position: relative !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 40px !important;
        height: 40px !important;
        border-radius: 11px !important;
        background: #F0EBFF !important;
        color: #6844DF !important;
    }

    html body .pv-pedido-cart-fab-copy {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        min-width: 0 !important;
        text-align: left !important;
    }

    html body .pv-pedido-cart-fab-action {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 7px !important;
        height: 44px !important;
        padding: 0 14px !important;
        border-radius: 10px !important;
        background: linear-gradient(115deg, #6234E7, #4B22D8) !important;
        color: #FFFFFF !important;
        font-size: 11px !important;
        font-weight: 850 !important;
        white-space: nowrap !important;
    }
}
