/**
 * Professional print layout for DataTables lists, report tables, and printThis modals.
 * Screen UI is unchanged; these rules apply to print previews and paper/PDF output.
 */

body.dt-print-view {
    margin: 0;
    padding: 0 4px 8px;
    color: #111;
    background: #fff;
    font-family: "DejaVu Sans", "Segoe UI", Tahoma, sans-serif;
}

body.dt-print-view .dt-print-header,
.dt-print-header {
    text-align: center;
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #1e3a5f;
}

body.dt-print-view .dt-print-logo,
.dt-print-logo {
    max-height: 56px;
    width: auto;
    display: block;
    margin: 0 auto 6px;
}

body.dt-print-view .dt-print-business,
.dt-print-business {
    margin: 0;
    font-size: 16pt;
    font-weight: 700;
    color: #1e3a5f;
}

body.dt-print-view .dt-print-title,
.dt-print-title {
    margin: 4px 0 0;
    font-size: 12pt;
    font-weight: 600;
}

body.dt-print-view .dt-print-meta,
.dt-print-meta {
    margin: 4px 0 0;
    font-size: 8pt;
    color: #555;
}

body.dt-print-view table.dt-print-table,
body.dt-print-view table.dataTable {
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: auto !important;
    font-size: 8.5pt !important;
}

body.dt-print-view table.dt-print-table thead th,
body.dt-print-view table.dataTable thead th {
    background: #1e3a5f !important;
    color: #fff !important;
    font-weight: 700;
    text-align: center;
    padding: 5px 6px !important;
    border: 1px solid #1e3a5f !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

body.dt-print-view table.dt-print-table tbody td,
body.dt-print-view table.dt-print-table tfoot th,
body.dt-print-view table.dt-print-table tfoot td {
    border: 1px solid #cbd5e1 !important;
    padding: 4px 6px !important;
    vertical-align: top !important;
    color: #111 !important;
}

body.dt-print-view table.dt-print-table tbody tr:nth-child(even) td {
    background: #f8fafc !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

@media print {
    html,
    body {
        background: #fff !important;
        color: #111 !important;
    }

    .system-header-shell,
    .side-bar,
    .main-sidebar,
    .main-header,
    .main-footer,
    .content-header,
    .no-print,
    .not-print,
    .print-hide,
    .not_exportable,
    .scrolltop,
    .overlay,
    .dt-buttons,
    .dataTables_filter,
    .dataTables_length,
    .dataTables_paginate,
    .dataTables_info,
    .nav-tabs,
    .nav-tabs-custom > .nav-tabs,
    .box-tools,
    .filters,
    .filter-box,
    #ai-chat-launcher,
    #ai-chat-window,
    .dropdown-menu {
        display: none !important;
    }

    th:has(#select-all-row),
    th:has(input[type="checkbox"]),
    td:has(input[type="checkbox"]),
    td.selectable_td,
    table.hide-footer tfoot {
        display: none !important;
    }

    .content-wrapper,
    .content,
    .box,
    .box-body,
    .tab-content,
    .tab-pane,
    .table-responsive,
    .dataTables_wrapper,
    .dataTables_scroll,
    .dataTables_scrollBody,
    #scrollable-container {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        position: static !important;
        box-shadow: none !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    table.table,
    table.dataTable,
    table.dt-print-table {
        width: 100% !important;
        border-collapse: collapse !important;
        table-layout: auto !important;
        font-size: 8.5pt !important;
    }

    table.table thead th,
    table.dataTable thead th,
    table.dt-print-table thead th {
        background: #1e3a5f !important;
        color: #fff !important;
        font-weight: 700;
        text-align: center;
        padding: 5px 6px !important;
        border: 1px solid #1e3a5f !important;
        white-space: normal !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    table.table tbody td,
    table.dataTable tbody td,
    table.dt-print-table tbody td,
    table.table tfoot td,
    table.dataTable tfoot td {
        border: 1px solid #cbd5e1 !important;
        padding: 4px 6px !important;
        vertical-align: top !important;
        white-space: normal !important;
        color: #111 !important;
    }

    table.table tbody tr:nth-child(even) td,
    table.dataTable tbody tr:nth-child(even) td {
        background: #f8fafc !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    img.product-thumbnail,
    td img {
        max-height: 28px;
        width: auto;
    }

    a[href]::after {
        content: none !important;
    }
}
