
        /* Base Styles */
        body {
            margin: 0;
            padding: 0;
            font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
            font-size: 12px;
            line-height: 1.5;
            color: #333;
            background-color: #f9f9f9;
        }
        
        /* Invoice Container */
        .invoice-box {
            max-width: 800px;
            margin: 20px auto;
            padding: 30px;
            border: 1px solid #e0e0e0;
            box-shadow: 0 0 15px rgba(0, 0, 0, 0.08);
            background-color: white;
            position: relative;
            overflow: hidden;
           
        }
        
       
    
        
        /* Header Section */
        .header3 {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            align-items: center;
            border-bottom: 2px solid #2a5caa;
            padding-bottom: 20px;
            margin-bottom: 20px;
        }
        
      
   
        .header-info {
            flex: 1;
            min-width: 250px;
            text-align: center;
            line-height: 1.6;
        }
        
        .company-name {
            margin: 0;
            color: #2a5caa;
            font-size: 22px;
            font-weight: 700;
        }
        
        .company-details {
            font-size: 11px;
            margin-top: 5px;
        }
        
        /* Invoice Title */
        .invoice-title {
            background-color: #2a5caa;
            color: white;
            padding: 8px 15px;
            margin: 0 -30px 20px;
            font-size: 14px;
            font-weight: 600;
            text-align: center;
            text-transform: uppercase;
        }
        
        /* Tables */
        table {
            width: 100%;
            border-collapse: collapse;
            margin-bottom: 20px;
        }
        
        th, td {
            padding: 8px 10px;
            text-align: left;
            vertical-align: top;
            border: 1px solid #e0e0e0;
        }
        
        th {
            background-color: #f5f5f5;
            font-weight: 600;
            color: #333;
        }
        
        .section-title td {
            background-color: #2a5caa;
            color: white;
            font-weight: 600;
            padding: 6px 10px;
            text-transform: uppercase;
            font-size: 11px;
        }
        
        /* Items Table */
        .items th {
            text-align: center;
            white-space: nowrap;
        }
        
        .items td {
            text-align: center;
        }
        
        .items td:nth-child(2) {
            text-align: left;
        }
        
        /* Totals Table */
        .totals {
            width: 50%;
            margin-left: auto;
            margin-bottom: 25px;
        }
        
        .totals td:first-child {
            text-align: right;
            font-weight: 600;
        }
        
        .totals td:last-child {
            text-align: right;
            font-weight: 600;
        }
        
        .totals tr:last-child td {
            border-top: 2px solid #2a5caa;
            font-size: 13px;
            color: #2a5caa;
        }
        
        /* Address Section */
        .address-box {
            padding: 8px;
            border: 1px solid #e0e0e0;
            background-color: #f9f9f9;
            margin-bottom: 5px;
        }
        
        .address-title {
            color: #2a5caa;
            font-weight: 600;
            margin-bottom: 5px;
        }
        
        /* Declaration Section */
        .declaration {
            margin: 25px 0;
            padding: 15px;
            border: 1px solid #e0e0e0;
            background-color: #f9f9f9;
        }
        
        .declaration h4 {
            margin-top: 0;
            color: #2a5caa;
            font-size: 13px;
            border-bottom: 1px solid #e0e0e0;
            padding-bottom: 5px;
        }
        
        .declaration ul {
            margin: 5px 0 0 0;
            padding-left: 18px;
            font-size: 11px;
        }
        
        .declaration li {
            margin-bottom: 3px;
        }
        
        /* Signature Section */
        .signature-container {
            display: flex;
            justify-content: space-between;
            margin: 30px 0;
        }
        
        .signature {
            text-align: center;
            width: 45%;
        }
        
        .signature-line {
            border-top: 1px dashed #333;
            padding-top: 10px;
            margin-top: 50px;
            font-size: 11px;
        }
        
        /* Footer Section */
/* Footer Section - Fixed for mPDF */
.footer {
    margin-top: 30px;
    padding-top: 15px;
    border-top: 2px solid #2a5caa;
    font-size: 11px;
}

.footer-content {
    display: table; /* mPDF-friendly layout */
    width: 100%;
}

.bank-details {
    display: table-cell;
    width: 60%; /* Left section width */
    text-align: left;
    padding-right: 20px;
    vertical-align: top;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    padding: 10px;
}

.qr-space {
    display: table-cell;
    width: 40%; /* Right section width */
    text-align: center;
    vertical-align: middle;
    border: 1px dashed #ccc;
    padding: 10px;
}

.qr-image {
    width: 120px;
    height: 120px;
    display: block;
    margin: 0 auto 5px;
}

.footer-note {
    clear: both;
    text-align: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}





/* Utility Classes */
        .text-right {
            text-align: right;
        }
        
        .text-center {
            text-align: center;
        }
        
        .text-bold {
            font-weight: 600;
        }
        
        .text-blue {
            color: #2a5caa;
        }
    
    
    
    /* Add these styles to your existing CSS */
.page-break-avoid {
    page-break-inside: avoid;
    break-inside: avoid;
}

.keep-together {
    page-break-inside: avoid;
    break-inside: avoid-page;
}

.section-container {
    page-break-after: auto;
    break-after: auto;
}

/* Force certain sections to start on new page if needed */
.new-page {
    page-break-before: always;
    break-before: page;
}

/* Table row page break handling */
tr {
    page-break-inside: avoid;
    break-inside: avoid;
}