/* ── Print-friendly overrides ────────────────────────────────────────
 * Loaded with media="print" so these rules only apply when the
 * operator uses the browser's Print dialog (Ctrl+P / Cmd+P) or
 * the "Print / PDF" button on supported pages. Hides the shell
 * chrome (sidebar, header, footer, action buttons) and styles
 * tables for clean printout or save-as-PDF.
 */
@media print {
    /* Hide all shell chrome and interactive elements. */
    .page-sidebar,
    .page-header,
    .page-footer,
    .nav-tabs,
    .breadcrumb-wrapper,
    .js-no-print,
    .btn:not(.btn-print-keep),
    footer,
    .modal,
    .modal-backdrop {
        display: none !important;
    }

    /* The main content area should fill the page without the
     * sidebar margin that the app layout applies. */
    .page-wrapper,
    .page-content-wrapper,
    .page-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    /* Cards should have visible borders and avoid page breaks
     * that would split a card across two pages. */
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        break-inside: avoid;
    }
    .card-header {
        background: #f8f9fa !important;
    }

    /* Tables: full width, visible borders, compact. */
    table {
        width: 100% !important;
        border-collapse: collapse !important;
    }
    th, td {
        border: 1px solid #ccc !important;
        padding: 4px 8px !important;
        font-size: 11pt !important;
    }

    /* General typography for print. */
    body {
        font-size: 12pt !important;
        color: #000 !important;
        background: #fff !important;
    }
    a {
        color: #000 !important;
        text-decoration: none !important;
    }

    /* Badges: keep visible but simplify for B&W printers. */
    .badge {
        border: 1px solid #999 !important;
        color: #000 !important;
        background: transparent !important;
    }
}
