/* Estilos globales de impresión (layout fuera del CSS scoped de componentes). */

@media print {

    @page {
        size: A4 landscape;
        margin: 12mm;
    }

    html,
    body {
        height: auto !important;
        overflow: visible !important;
        background: #fff !important;
        color: #000 !important;
    }

    /* Estructura del shell */
    .nexpro-sidebar,
    .nexpro-mobile-topbar,
    .nexpro-mobile-backdrop,
    .nexpro-loading,
    .nexpro-sidebar-flyout {
        display: none !important;
    }

    .nexpro-layout,
    .nexpro-main,
    .nexpro-content {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        width: auto !important;
        max-width: none !important;
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        background: #fff !important;
    }

    /* Superficies: sin sombras ni fondos que gasten tóner */
    .nc-module-panel,
    .nc-kpi-tile,
    .nc-chart-card {
        box-shadow: none !important;
        border: 1px solid #bbb !important;
        background: #fff !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    /*
     * Chart.js fija el alto del canvas por estilo inline al redibujar para papel.
     * No se lo sobreescribe con height:auto porque eso descartaría ese redibujado
     * y volvería a estirar el mapa de bits de pantalla; solo se evita que desborde
     * el ancho de la caja.
     */
    canvas {
        max-width: 100% !important;
    }

    /*
     * Controles fuera del papel. No se ocultan input/select en general porque otras
     * pantallas podrían imprimir un formulario con sus valores cargados; alcanza con
     * sacar botones y barras de filtro.
     */
    button,
    .nc-btn,
    .nc-filter-bar,
    .nc-pagination {
        display: none !important;
    }

    a[href]::after {
        content: none !important;
    }
}
