﻿@page {
    size: landscape;
    margin-top: 0cm;
    margin-bottom: 0cm;
    margin-left: 0;
    margin-right: 0;
}

@media print {
    html, body {
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Prevent Chrome from shrinking content */
    body {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        zoom: 1 !important;
    }

    .no-print {
        display: none !important;
    }

    .print-only {
        display: block !important;
    }

    [class*="col-"] {
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: none !important;
    }

    /* 5 columns per row */
    .row > .col-print-5 {
        flex: 0 0 20% !important;
        max-width: 300px !important;
        width: 300px !important;
    }

    /* 4 columns per row */
    .row > .col-print-3 {
        flex: 0 0 25% !important;
        max-width: 25% !important;
        width: 25% !important;
    }

    /* 3 columns per row */
    .row > .col-print-4 {
        flex: 0 0 33.333% !important;
        max-width: 33.333% !important;
        width: 33.333% !important;
    }

    /* 2 columns per row - LANDSCAPE: ~5.5in per column at 96dpi = ~528px */
    .row > .col-print-6 {
        flex: 0 0 50% !important;
        max-width: 800px !important;
        width: 800px !important;
    }

    /* 1 column per row */
    .row > .col-print-12 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Restore flexbox rows */
    .row {
        display: flex !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
    }

    /* Prevent cards from splitting */
    .card,
    .h-100 {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    /* Force page break before AccountDebtorLimits */
    .print-break-before {
        page-break-before: always;
        break-before: page;
    }

    /* Hide ApexCharts toolbar */
    .apexcharts-toolbar,
    .apexcharts-menu,
    .apexcharts-menu-icon {
        display: none !important;
    }

    /* Area/Line charts - full width and height */
    .chart-area,
    .chart-remittance {
        height: 600px !important;
        min-height: 600px !important;
        width: 100% !important;
    }

        /* Nested divs */
        .chart-area > div,
        .chart-remittance > div {
            height: 600px !important;
            min-height: 600px !important;
            width: 100% !important;
        }

        /* ApexCharts canvas */
        .chart-area .apexcharts-canvas,
        .chart-remittance .apexcharts-canvas {
            height: 600px !important;
            min-height: 600px !important;
            width: 100% !important;
        }

        /* SVG elements - CRITICAL: set both width AND height */
        .chart-area svg.apexcharts-svg,
        .chart-remittance svg.apexcharts-svg {
            height: 600px !important;
            width: 100% !important;
        }

        .chart-area foreignObject,
        .chart-remittance foreignObject {
            height: 600px !important;
            width: 100% !important;
        }

    /* Chart container */
    .chart-container {
        width: 100% !important;
        height: auto !important;
    }
}
