﻿/* ============================= */
/* GLOBAL PRINT RESET */
/* ============================= */
@media print {

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        box-sizing: border-box;
    }

    body {
        margin: 0;
        padding: 0;
        font-family: Arial;
        color: #000;
        font-size: 9pt;
    }

    /* ============================= */
    /* REPORT CONTAINER */
    /* ============================= */
    .report-container {
        width: 100%;
        padding: 5px 10px;
    }

    .portrait-mode {
        width: 210mm; /* A4 width */
        height: 297mm; /* A4 height */
        border: 1px solid #000000;
        margin: auto
    }

    .landscape-mode {
        width: 100%;
        border: 1px solid #000000;
    }

    /* ============================= */
    /* HEADER (LIKE YOUR IMAGE) */
    /* ============================= */
    .report-header {
        width: 100%;
        border-collapse: collapse;
        table-layout: fixed;
        font-size: 12px;
    }

        .report-header td {
            white-space: nowrap;
            vertical-align: middle;
        }

        .report-header .left {
            text-align: left;
            width: 33.33%;
        }

        .report-header .center {
            text-align: center;
            width: 33.33%;
            font-weight: bold;
        }

        .report-header .right {
            text-align: right;
            width: 33.33%;
        }

    /* ============================= */
    /* TITLE & SUBTITLE */
    /* ============================= */
    .report-title {
        text-align: center;
        font-weight: bold;
        font-size: 16px;
        margin-top: 6px;
    }

    .report-subtitle {
        text-align: center;
        font-size: 12px;
        margin-top: 3px;
    }

    /* ============================= */
    /* TABLE STYLING (PDF SAFE) */
    /* ============================= */
    .table-report {
        width: 100%;
        border-collapse: collapse;
        margin-top: 10px;
    }

        .table-report th,
        .table-report td {
            border: 1px solid #000;
            padding: 4px 6px;
            font-size: 11px;
        }

        .table-report th {
            font-weight: bold;
            text-align: center;
        }

    /* Repeat table header on each page */
    thead {
        display: table-header-group;
    }

    tfoot {
        display: table-footer-group;
    }

    tr {
        page-break-inside: avoid;
    }

    /* ============================= */
    /* PAGE BREAK CONTROL */
    /* ============================= */
    .page-break {
        page-break-before: always;
    }

    .no-break {
        page-break-inside: avoid;
    }

    .keep-together {
        page-break-inside: avoid;
    }

    /* ============================= */
    /* ALIGNMENT UTILITIES */
    /* ============================= */
    .text-left {
        text-align: left !important;
    }

    .text-center {
        text-align: center !important;
    }

    .text-right {
        text-align: right !important;
    }

    /* ============================= */
    /* SPACING UTILITIES */
    /* ============================= */
    .mt-5 {
        margin-top: 5px !important;
    }

    .mt-10 {
        margin-top: 10px !important;
    }

    .mb-5 {
        margin-bottom: 5px !important;
    }

    .mb-10 {
        margin-bottom: 10px !important;
    }

    /* ============================= */
    /* HIDE / SHOW IN PRINT */
    /* ============================= */
    .no-print {
        display: none !important;
    }

    .print-only {
        display: block !important;
    }

    /* ============================= */
    /* BOOTSTRAP FIXES (IMPORTANT) */
    /* ============================= */

    /* Remove flex (breaks in PDF) */
    .d-flex,
    .row {
        display: block !important;
    }

    /* Columns full width */
    [class*="col-"] {
        width: 100% !important;
        float: none !important;
    }

    /* Remove gaps */
    .gap,
    .g-1, .g-2, .g-3, .g-4, .g-5 {
        gap: 0 !important;
    }

    /* ============================= */
    /* BORDERS & BOXES */
    /* ============================= */
    .border {
        border: 1px solid #000 !important;
    }

    .border-none {
        border: none !important;
    }
}
