@media print {
    /* Hide elements not needed for printing */
    .no-print,
    .card-header .btn,
    .export-buttons,
    .navbar,
    .sidebar,
    .footer,
    button,
    .btn {
        display: none !important;
    }

    /* Reset page margins */
    @page {
        margin: 0.5in;
        size: A4;
    }

    /* Body styles for print */
    body {
        font-family: 'Arial', sans-serif;
        font-size: 12px;
        line-height: 1.3;
        color: #000 !important;
        background: white !important;
    }

    /* Container styles */
    .container-fluid {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Card styles */
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
        background: white !important;
        margin-bottom: 1rem !important;
    }

    .card-header {
        background: #f8f9fa !important;
        border-bottom: 1px solid #000 !important;
        padding: 0.5rem !important;
    }

    .card-body {
        padding: 0.5rem !important;
    }

    /* Summary cards for print */
    .summary-cards .card {
        border: 1px solid #000 !important;
        margin-bottom: 0.5rem !important;
    }

    .summary-cards .card-body {
        padding: 0.3rem !important;
    }

    .summary-cards h5 {
        font-size: 10px !important;
        margin-bottom: 0.2rem !important;
        color: #000 !important;
    }

    .summary-cards h3 {
        font-size: 14px !important;
        margin: 0 !important;
        color: #000 !important;
    }

    /* Table styles */
    .table {
        font-size: 10px !important;
        margin: 0 !important;
        border-collapse: collapse !important;
        width: 100% !important;
    }

    .table th,
    .table td {
        border: 1px solid #000 !important;
        padding: 0.25rem !important;
        color: #000 !important;
        background: white !important;
    }

    .table thead th {
        background: #f8f9fa !important;
        font-weight: bold !important;
        text-align: center !important;
    }

    /* Badge styles for print */
    .badge {
        border: 1px solid #000 !important;
        background: white !important;
        color: #000 !important;
        padding: 0.1rem 0.3rem !important;
        margin: 0.1rem !important;
        font-size: 8px !important;
    }

    /* Text color overrides */
    .text-primary,
    .text-success,
    .text-danger,
    .text-warning,
    .text-info,
    .text-muted {
        color: #000 !important;
    }

    /* Hide collapse functionality */
    .collapse {
        display: block !important;
    }

    /* Print specific classes */
    .print-header {
        text-align: center;
        margin-bottom: 1rem;
    }

    .print-footer {
        text-align: center;
        margin-top: 1rem;
        font-size: 10px;
        border-top: 1px solid #000;
        padding-top: 0.5rem;
    }

    /* Force page breaks */
    .page-break {
        page-break-before: always;
    }

    /* Ensure no background colors */
    * {
        background: white !important;
        color: #000 !important;
    }

    /* Icons for print - replace with text */
    .fas,
    .fa,
    .ti {
        display: none !important;
    }

    /* Table responsive wrapper */
    .table-responsive {
        overflow: visible !important;
    }

    /* Row and column adjustments */
    .row {
        margin: 0 !important;
    }

    .col,
    .col-md-3,
    .col-md-4,
    .col-md-6,
    .col-md-12 {
        padding: 0.25rem !important;
    }
}