.payslip-container {
    width: 210mm;
    height: 290mm;
    padding: 15mm;
    margin: 0 auto;
    background: white;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Header */
.payslip-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}

.company-info h1 {
    color: #212529;
    margin: 0;
    font-size: 20px;
}

.document-title h1 {
    color: #212529;
    margin: 0;
    font-size: 24px;
    letter-spacing: 2px;
}

/* Grid for Employee/Meta */
.details-grid {
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: 20px;
    margin-bottom: 30px;
}

.blue-label {
    background-color: #686868;
    color: white;
    padding: 4px 8px;
    font-weight: bold;
    display: block;
    font-size: 10px;
}

.employee-box {
    border: 1px solid #ddd;
}

.info-content {
    padding: 10px;
    line-height: 1.6;
}

.meta-box {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.meta-row {
    display: flex;
    gap: 5px;
}

.meta-col {
    flex: 1;
    border: 1px solid #ddd;
}

.meta-col .data {
    padding: 5px;
    text-align: center;
    background: #eee;
    font-weight: bold;
}

.payment-method {
    margin-top: 15px;
}

/* Tables */
.payslip-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    table-layout: fixed;
}

.payslip-table-header th {
    background-color: #e4e4e4;
    padding: 6px;
    text-align: left;
    border-bottom: 2px solid #212529;
}

.payslip-table td {
    padding: 6px;
    border-bottom: 1px solid #eee;
}

.payslip-table th:nth-child(1),
.payslip-table td:nth-child(1) {
    width: 31%;
}

.payslip-table th:nth-child(2),
.payslip-table td:nth-child(2),
.payslip-table th:nth-child(3),
.payslip-table td:nth-child(3) {
    width: 12.5%;
}

.payslip-table th:nth-child(4),
.payslip-table td:nth-child(4),
.payslip-table th:nth-child(5),
.payslip-table td:nth-child(5) {
    width: 22%;
    text-align: right;
    white-space: nowrap;   
}

.text-right {
    text-align: right;
}

.summary-row td {
    background-color: #e4e4e4;
    font-weight: bold;
    padding: 8px;
}

.empty-row td {
    height: 40px;
}

/* Net Pay Section */
.net-pay-section {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.net-pay-box {
    background-color: #e4e4e4;
    display: grid;
    grid-template-columns: 1fr 22.5% 22.5%;
    font-weight: bold;
    font-size: 1.2rem;
    border: 1px solid #212529;
    width: 100%;
}

.net-pay-box .label {
    padding: 10px;
    text-align: right;
    text-transform: uppercase;
}

.net-pay-box .value {
    padding: 10px;
    text-align: right;
    border-left: 1px solid #ccc;
}

/* Footer */
.footer {
    margin-top: 50px;
    text-align: center;
    font-size: 8px;
    color: #555;
}

/* --- PRINT SETTINGS --- */
@media print {
    @page {
        size: A4;
    }

    body {
        background: none;
        padding: 0;
    }

    .payslip-container {
        box-shadow: none;
        margin: 0;
        width: 100%;
        height: 100vh;
        padding: 10mm;
        page-break-after: avoid;
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

}