/* 
  Print Optimization Styles for High Contrast & Sharpness
  Forces true black text and prevents browser dimming/graying in PDF outputs.
*/

@media print {

    /* Global reset for all elements in print mode */
    * {
        color: #000000 !important;
        background: transparent !important;

        /* Force browser to render exact colors, preventing the typical "fading" effect */
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;

        /* Text rendering optimizations */
        -webkit-font-smoothing: antialiased !important;
        -moz-osx-font-smoothing: grayscale !important;
        text-rendering: optimizeLegibility !important;
    }

    /* Increase font weight slightly for better readability if necessary */
    body,
    p,
    span,
    div,
    td,
    th {
        font-weight: 400 !important;
        /* Adjust if the font appears too thin */
    }

    /* Ensure bold elements are properly contrasted */
    strong,
    b,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        color: #000000 !important;
        font-weight: 700 !important;
    }

    /* Links should be black and underlined for visibility in print */
    a {
        color: #000000 !important;
        text-decoration: underline !important;
    }

    /* Force background colors for elements that strictly need them (like status badges) */
    /* Use with caution as it overrides the "*" rule above */
    .status-badge,
    .badge,
    [class*="status-"] {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Hide UI elements that are irrelevant for PDF */
    button,
    nav,
    .no-print,
    .sidebar,
    aside {
        display: none !important;
    }
}