/* print.css — report-friendly printing (loaded with media="print").
   Hides the app chrome and formats the page content as a clean paper report.
   Browser "Save as PDF" turns this into a PDF with no server-side library. */
@media print {
    /* Hide navigation / chrome */
    .app-sidebar,
    .app-header,
    .app-footer,
    .table-tools-bar,
    .d-print-none,
    .btn,
    form[data-ajax-search],
    .pagination,
    .navbar-badge {
        display: none !important;
    }

    /* Let the content use the full page width */
    .app-wrapper,
    .app-main,
    .app-content,
    .app-content-header {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 12px;
    }

    .card {
        border: none !important;
        box-shadow: none !important;
    }

    .card-header {
        background: #fff !important;
        border-bottom: 2px solid #1e7e34 !important;
        padding-left: 0 !important;
    }

    /* Report header injected before content via .print-title */
    .print-title {
        display: block !important;
    }

    /* Tables: print all rows, with borders, and don't split rows across pages */
    table {
        width: 100% !important;
        border-collapse: collapse !important;
    }

    table th,
    table td {
        border: 1px solid #999 !important;
        padding: 4px 6px !important;
    }

    thead {
        display: table-header-group; /* repeat header on each printed page */
    }

    tr {
        page-break-inside: avoid;
    }

    /* Charts and maps don't print usefully — hide them */
    .apexcharts-canvas,
    .leaflet-container,
    [id$="Chart"],
    [id$="chart"] {
        display: none !important;
    }

    a[href]::after {
        content: ""; /* don't append URLs after links */
    }
}

/* The report title block is only meaningful on paper. */
.print-title {
    display: none;
}
