/* Spec 002 — Estilos de impressão (A4 retrato) */

@media print {
    /* Esconder elementos interativos */
    .settings-btn,
    .offcanvas,
    .offcanvas-backdrop,
    .nav-tabs,
    .nav-link,
    .upload-section {
        display: none !important;
    }

    /* Seção de gauges: caber em A4 retrato */
    .gauges-section {
        min-height: auto !important;
        page-break-after: always;
        padding: 0.5rem 0;
    }

    /* Gauge principal: reduzir para caber com individuais */
    .gauge-principal {
        max-width: 500px !important;
        margin: 0 auto !important;
    }

    .gauge-principal .dash-graph {
        transform: scale(0.7);
        transform-origin: top center;
        margin-bottom: -100px;
    }

    /* Gauges individuais: 2 por linha para caber melhor */
    .gauges-section .row > [class*="col"] {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        padding: 0 0.25rem !important;
    }

    .gauges-section .row > [class*="col"] .dash-graph {
        transform: scale(0.55);
        transform-origin: top center;
        margin-bottom: -120px;
    }

    /* Título menor para economizar espaço */
    .gauges-section .section-title {
        font-size: 0.8rem;
        margin-bottom: 0.1rem !important;
        margin-top: 0 !important;
    }

    /* Centralizar conteúdo */
    .gauges-section .row {
        justify-content: center !important;
    }

    /* Detalhamento em páginas seguintes */
    .detail-section {
        page-break-before: always;
    }

    /* Accordion: expandir tudo para impressão */
    .accordion-collapse {
        display: block !important;
        height: auto !important;
    }

    .accordion-button::after {
        display: none !important;
    }

    /* Remover backgrounds desnecessários */
    body {
        background: white !important;
    }

    .container-fluid {
        padding: 0 !important;
    }

    /* Tabelas: evitar quebra no meio */
    table {
        page-break-inside: avoid;
    }

    tr {
        page-break-inside: avoid;
    }
}
