/* Estadisticas: cabecera y filtros compactos en tablet. */
@media (min-width: 540px) and (max-width: 1366px) {
    html body .pvf-shell .pv-est-page .pv-est-command {
        grid-template-columns: minmax(0, 1fr) auto !important;
        column-gap: 12px !important;
    }

    html body .pvf-shell .pv-est-page .pv-est-head-left {
        grid-column: 1 !important;
        grid-row: 1 !important;
        min-width: 0 !important;
    }

    html body .pvf-shell .pv-est-page .pv-est-head-right {
        grid-column: 2 !important;
        grid-row: 1 !important;
    }

    html body .pvf-shell .pv-est-page .pv-est-toolbar-row {
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 10px 18px 14px !important;
        border-top: 1px solid #e7ebf2 !important;
        background: linear-gradient(180deg, #fbfcff 0%, #f7f9fd 100%) !important;
    }

    html body .pvf-shell .pv-est-page .pv-est-barra {
        display: grid !important;
        grid-template-columns: minmax(220px, 300px) minmax(135px, 160px) !important;
        align-items: end !important;
        justify-content: center !important;
        gap: 12px !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    html body .pvf-shell .pv-est-page .pv-est-periodo-grupo {
        grid-column: 1 !important;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    html body .pvf-shell .pv-est-page .pv-est-campo-periodo {
        grid-column: 1 / -1 !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    html body .pvf-shell .pv-est-page .pv-est-campo-periodo > span {
        white-space: nowrap !important;
    }

    html body .pvf-shell .pv-est-page .pv-est-avanzados-inline {
        grid-column: 2 !important;
        align-self: end !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    html body .pvf-shell .pv-est-page .pv-est-command .pv-est-avanzados > summary {
        width: 100% !important;
        min-width: 0 !important;
        justify-content: center !important;
    }

    html body .pvf-shell .pv-est-page .pv-est-barra:has(.pv-est-campo-fecha:not(.pv-est-oculto)) .pv-est-periodo-grupo {
        grid-column: 1 / -1 !important;
    }

    html body .pvf-shell .pv-est-page .pv-est-barra:has(.pv-est-campo-fecha:not(.pv-est-oculto)) .pv-est-avanzados-inline {
        grid-column: 2 !important;
    }
}

@media (min-width: 540px) and (max-width: 620px) {
    html body .pvf-shell .pv-est-page .pv-est-barra {
        grid-template-columns: minmax(0, 1fr) 135px !important;
        justify-content: stretch !important;
        gap: 10px !important;
    }
}
