/* ============================================================
   PROFESSIONAL PRINT STYLES FOR LAVSMS
   ============================================================ */

/* Print Header - Professional 3-Column Layout */
.print-header {
    display: none;
}

.print-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 0 20px;
    border-bottom: 3px double #1a1a2e;
    margin-bottom: 25px;
}

/* Left: Logo */
.print-header-left {
    flex: 0 0 auto;
    width: 120px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.print-header-left img {
    max-width: 100px;
    max-height: 100px;
    object-fit: contain;
}

.print-header-left .logo-placeholder {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #4e73df, #224abe);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 40px;
    font-weight: bold;
}

/* Center: Company Details */
.print-header-center {
    flex: 1;
    text-align: center;
    padding: 0 15px;
}

.print-header-center .company-name {
    margin: 0;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #1a1a2e;
    text-transform: uppercase;
    line-height: 1.2;
}

.print-header-center .company-tagline {
    margin: 4px 0 0;
    font-size: 12px;
    font-style: italic;
    color: #666;
    letter-spacing: 0.5px;
}

.print-header-center .company-address {
    margin: 8px 0 0;
    font-size: 11px;
    color: #444;
    line-height: 1.4;
}

.print-header-center .company-contact {
    margin: 4px 0 0;
    font-size: 11px;
    color: #444;
}

.print-header-center .company-contact span {
    display: inline-block;
    margin: 0 6px;
}

.print-header-center .company-contact strong {
    color: #1a1a2e;
}

/* Right: DateTime */
.print-header-right {
    flex: 0 0 auto;
    width: 180px;
    text-align: right;
    font-size: 10px;
    color: #555;
    line-height: 1.6;
}

.print-header-right .print-meta {
    display: inline-block;
    text-align: left;
    background: #f8f9fc;
    border: 1px solid #e3e6f0;
    border-radius: 8px;
    padding: 10px 12px;
    min-width: 160px;
}

.print-header-right .print-meta-item {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 0;
    border-bottom: 1px dashed #e3e6f0;
}

.print-header-right .print-meta-item:last-child {
    border-bottom: none;
}

.print-header-right .print-meta-item .label {
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 9px;
    letter-spacing: 0.3px;
}

.print-header-right .print-meta-item .value {
    color: #1a1a2e;
    font-weight: 700;
}

/* Report Title */
.print-report-title {
    display: none;
    text-align: center;
    margin: 20px 0 25px;
    padding: 12px 0;
    background: linear-gradient(90deg, transparent, #f0f2f7, transparent);
    position: relative;
}

.print-report-title::before,
.print-report-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 25%;
    height: 1px;
    background: #d1d5db;
}
.print-report-title::before { left: 0; }
.print-report-title::after { right: 0; }

.print-report-title h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #1a1a2e;
    display: inline-block;
    padding: 0 15px;
    background: white;
    position: relative;
    z-index: 1;
}

.print-report-title p {
    margin: 6px 0 0;
    font-size: 11px;
    color: #666;
    font-style: italic;
}

/* Print Footer */
.print-footer {
    display: none;
}

.print-footer-content {
    margin-top: 40px;
    padding-top: 15px;
    border-top: 2px solid #1a1a2e;
}

.print-footer-signatures {
    display: flex;
    justify-content: space-between;
    gap: 60px;
    margin-bottom: 20px;
    padding: 0 40px;
}

.signature-block {
    flex: 1;
    text-align: center;
}

.signature-line {
    border-top: 1px solid #333;
    margin-top: 45px;
    padding-top: 6px;
    font-size: 11px;
    color: #333;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.signature-label {
    font-size: 10px;
    color: #666;
    margin-top: 2px;
}

.print-footer-meta {
    text-align: center;
    font-size: 10px;
    color: #888;
    border-top: 1px dashed #ccc;
    padding-top: 12px;
    line-height: 1.6;
}

.print-footer-meta strong {
    color: #333;
}

.print-footer-meta .confidential {
    font-style: italic;
    color: #999;
    font-size: 9px;
    margin-top: 4px;
}

/* ============================================================
   ACTUAL PRINT MEDIA QUERIES
   ============================================================ */

@media print {
    /* Hide everything that shouldn't print */
    .no-print,
    .sidebar,
    .topbar,
    .btn,
    button,
    .modal,
    .modal-backdrop,
    .dataTables_length,
    .dataTables_filter,
    .dataTables_info,
    .dataTables_paginate,
    .dataTables_processing,
    .modern-filter-card,
    .user-stat-card,
    .action-btns,
    .action-btn,
    nav,
    header,
    footer:not(.print-footer) {
        display: none !important;
    }
    
    /* Show print elements */
    .print-header { display: block !important; }
    .print-report-title { display: block !important; }
    .print-footer { display: block !important; }
    
    /* Reset body for print */
    body {
        background: #fff !important;
        font-size: 11px !important;
        font-family: 'Arial', 'Helvetica', sans-serif !important;
        color: #000 !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Reset layout */
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    
    .content-area {
        padding: 15mm 12mm !important;
        margin: 0 !important;
    }
    
    /* Tables */
    table {
        width: 100% !important;
        border-collapse: collapse !important;
        page-break-inside: auto;
        font-size: 10px;
    }
    
    thead {
        display: table-header-group;
    }
    
    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
    
    th, td {
        border: 1px solid #ccc !important;
        padding: 6px 8px !important;
        text-align: left;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    th {
        background: #f0f2f7 !important;
        font-weight: 700;
        text-transform: uppercase;
        font-size: 9px;
        color: #1a1a2e;
    }
    
    /* Cards should not have shadows */
    .card,
    .modern-table-card,
    .modern-card {
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
    }
    
    /* Page setup */
    @page {
        size: A4;
        margin: 12mm;
    }
    
    @page :first {
        margin-top: 10mm;
    }
    
    /* Avatars in print */
    .user-avatar {
        width: 28px !important;
        height: 28px !important;
        border: 1px solid #ccc !important;
    }
    
    /* Badges in print */
    .role-badge {
        font-size: 9px !important;
        padding: 2px 6px !important;
        border-radius: 3px !important;
        color: #000 !important;
        background: #e9ecef !important;
        border: 1px solid #ccc !important;
    }
    
    /* Prevent page breaks inside small elements */
    .user-info,
    .role-badge,
    tr {
        page-break-inside: avoid;
    }
    
    /* Add page break before footer */
    .print-footer {
        page-break-inside: avoid;
    }
}
/* Profile Print Styles */
.print-profile {
    page-break-inside: avoid;
}

.print-profile-header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 2px solid #1a1a2e;
    margin-bottom: 25px;
}

.print-profile-header img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #4e73df;
    margin-bottom: 15px;
}

.print-profile-header h3 {
    margin: 5px 0;
    font-size: 22px;
    font-weight: 800;
    color: #1a1a2e;
}

.print-profile-header p {
    margin: 3px 0 10px;
    color: #666;
    font-size: 13px;
}

.print-role-badge {
    display: inline-block;
    background: #4e73df;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.print-detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.print-detail-table th {
    background: #1a1a2e !important;
    color: white !important;
    padding: 10px 15px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: left;
}

.print-detail-table td {
    padding: 10px 15px;
    border: 1px solid #ddd;
    font-size: 11px;
}

.print-detail-table td:first-child {
    width: 200px;
    font-weight: 700;
    background: #f8f9fc;
    color: #333;
}

.print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
}

.print-table thead {
    display: table-header-group;
}

.print-table th {
    background: #1a1a2e !important;
    color: white !important;
    padding: 8px 10px;
    text-transform: uppercase;
    font-size: 9px;
    letter-spacing: 0.5px;
    border: 1px solid #1a1a2e;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.print-table td {
    padding: 8px 10px;
    border: 1px solid #ddd;
    color: #333;
}

.print-table tbody tr:nth-child(even) {
    background: #f8f9fc;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}