.payslips-page {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    color: var(--text-primary);
}


    .payslips-page *,
    .payslips-page *::before,
    .payslips-page *::after {
        box-sizing: border-box;
    }


/* =========================================================
   SCREEN HEADER
   ========================================================= */

.screen-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 17px 19px;
    border: 1px solid var(--primary-border);
    border-radius: 18px;
    background: linear-gradient( 135deg, var(--surface-1), var(--surface-2) );
    box-shadow: var(--shadow-sm);
}


.screen-header-icon {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: var(--primary);
    color: #fff;
}


    .screen-header-icon svg {
        width: 30px;
        height: 30px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }


.screen-header-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}


    .screen-header-copy > span {
        color: var(--primary);
        font-size: 13px;
        font-weight: 900;
    }


.screen-header h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 950;
}


.screen-header p {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
}


/* =========================================================
   PRINT BUTTON
   ========================================================= */

.print-payslip-button {
    min-width: 125px;
    height: 48px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-right: auto;
    padding: 0 18px;
    border: 0;
    border-radius: 11px;
    outline: none;
    background: var(--primary);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 5px 14px rgba(37, 99, 235, .20);
    transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease;
}


    .print-payslip-button:hover:not(:disabled) {
        transform: translateY(-1px);
        box-shadow: 0 7px 18px rgba(37, 99, 235, .25);
    }


    .print-payslip-button:disabled {
        opacity: .45;
        cursor: default;
    }


    .print-payslip-button svg {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }


/* =========================================================
   FILTER PANEL
   ========================================================= */

.filter-panel {
    width: 100%;
    display: grid;
    grid-template-columns: 110px 135px 190px minmax(280px, 1fr) minmax(300px, 1fr);
    align-items: end;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 15px;
    background: var(--surface-1);
    box-shadow: var(--shadow-sm);
}


.filter-field {
    min-width: 0;
    display: grid;
    grid-template-rows: auto 48px;
    gap: 7px;
    margin: 0;
}


.filter-caption {
    display: block;
    margin: 0;
    padding: 0 2px;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.5;
}


/* =========================================================
   FILTER SELECTS
   ========================================================= */

.filter-panel select {
    width: 100%;
    height: 48px;
    min-width: 0;
    padding: 0 13px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    outline: none;
    background: var(--surface-2);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    font-weight: 850;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}


    .filter-panel select:hover {
        border-color: var(--primary-border);
    }


    .filter-panel select:focus {
        border-color: var(--primary);
        background: var(--surface-1);
        box-shadow: 0 0 0 3px var(--primary-soft);
    }


    .filter-panel select:disabled {
        cursor: default;
        opacity: .65;
    }


.employee-filter select {
    font-size: 15px;
    font-weight: 900;
}


/* =========================================================
   EMPLOYEE SEARCH
   ========================================================= */

.search-filter {
    min-width: 0;
}


.employee-search-box {
    position: relative;
    width: 100%;
    height: 48px;
}


    .employee-search-box input {
        width: 100%;
        height: 48px;
        min-width: 0;
        padding: 0 44px 0 39px;
        border: 1px solid var(--border-color);
        border-radius: 10px;
        outline: none;
        background: var(--surface-2);
        color: var(--text-primary);
        direction: rtl;
        font-family: inherit;
        font-size: 15px;
        font-weight: 850;
        transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
    }


        .employee-search-box input:hover {
            border-color: var(--primary-border);
        }


        .employee-search-box input:focus {
            border-color: var(--primary);
            background: var(--surface-1);
            box-shadow: 0 0 0 3px var(--primary-soft);
        }


        .employee-search-box input::placeholder {
            color: var(--text-muted);
            font-family: inherit;
            font-size: 13.5px;
            font-weight: 700;
            opacity: .8;
        }


.employee-search-icon {
    position: absolute;
    right: 13px;
    top: 50%;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    color: var(--primary);
    pointer-events: none;
    z-index: 2;
}


    .employee-search-icon svg {
        width: 21px;
        height: 21px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }


.clear-search {
    position: absolute;
    left: 9px;
    top: 50%;
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 8px;
    outline: none;
    background: transparent;
    color: var(--text-muted);
    font-family: Arial, sans-serif;
    font-size: 23px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    z-index: 3;
}


    .clear-search:hover {
        background: var(--primary-soft);
        color: var(--primary);
    }


/* =========================================================
   PREVIEW AREA
   ========================================================= */

.payslip-preview-area {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow: visible;
}


/* =========================================================
   PAYSLIP CARD
   ========================================================= */

.payslip-card {
    width: 1360px;
    max-width: none;
    margin: 0 auto 20px;
    overflow: hidden;
    border: 1px solid #b9cef0;
    border-radius: 17px;
    background: #fff;
    color: #071a49;
    box-shadow: 0 12px 35px rgba(15, 23, 42, .08), 0 2px 8px rgba(37, 99, 235, .05);
}





/* =========================================================
   SVG
   ========================================================= */

.payslip-card svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* =========================================================
   SLIP HEADER
   ========================================================= */

.slip-header {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 155px;
    grid-template-areas:
        "meta title logo";
    align-items: center;
    gap: 22px;
    min-height: 130px;
    padding: 18px 28px;
    direction: ltr;
    background: #fff;
}


.slip-meta-card {
    grid-area: meta;
    min-height: 92px;
    display: flex;
    align-items: center;
    gap: 15px;
    direction: ltr;
    padding: 12px 16px;
    border: 1px solid #b7cdf5;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(37, 99, 235, .05);
}


.meta-icon {
    width: 56px;
    height: 60px;
    flex: 0 0 56px;
    display: grid;
    place-items: center;
    padding-right: 13px;
    border-right: 1px solid #d7e1f3;
    color: #073fd1;
}


    .meta-icon svg {
        width: 40px;
        height: 40px;
    }


.meta-copy {
    flex: 1;
    display: grid;
    gap: 4px;
    direction: rtl;
    text-align: center;
}


    .meta-copy span {
        color: #19356c;
        font-size: 16px;
        font-weight: 900;
    }


    .meta-copy strong {
        color: #073fc4;
        font-size: 24px;
        font-weight: 950;
        white-space: nowrap;
    }


    .meta-copy small {
        color: #65748d;
        font-size: 14px;
        font-weight: 800;
    }


/* =========================================================
   SLIP TITLE
   ========================================================= */

.slip-brand-title {
    grid-area: title;
    direction: rtl;
    text-align: center;
}


    .slip-brand-title span {
        color: #111827;
        font-size: 22px;
        font-weight: 900;
    }


    .slip-brand-title h2 {
        margin: 7px 0 0;
        color: #071942;
        font-size: 42px;
        font-weight: 950;
    }


/* =========================================================
   LOGO
   ========================================================= */

.slip-logo {
    grid-area: logo;
    display: grid;
    place-items: center;
}


    .slip-logo img {
        width: 125px;
        max-height: 100px;
        object-fit: contain;
    }


/* =========================================================
   EMPLOYEE INFO
   ========================================================= */

.employee-info-card {
    margin: 0 14px 12px;
    overflow: hidden;
    border: 1px solid #b7cdf5;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(37, 99, 235, .04);
}


.info-row {
    display: grid;
    border-bottom: 1px solid #d4dff0;
}


    .info-row:last-child {
        border-bottom: 0;
    }


.info-row-main {
    grid-template-columns: 1fr 1.55fr 1fr;
}


.info-row-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}


.info-row-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}


.info-cell {
    min-height: 70px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 22px;
    border-left: 1px solid #d8e2f0;
}


    .info-cell:last-child {
        border-left: 0;
    }


.info-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: grid;
    place-items: center;
    color: #063fc9;
}


    .info-icon svg {
        width: 36px;
        height: 36px;
    }


.info-cell > div {
    min-width: 0;
    display: grid;
    gap: 4px;
}


    .info-cell > div > span {
        color: #485f88;
        font-size: 16px;
        font-weight: 850;
    }


.info-cell strong {
    color: #08183d;
    font-size: 20px;
    font-weight: 950;
}


.info-name strong {
    font-size: 22px;
}


/* =========================================================
   TABLES
   ========================================================= */

.pay-tables {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
        "deduction income";
    direction: ltr;
    gap: 18px;
    padding: 0 14px 15px;
}


.deduction-table {
    grid-area: deduction;
}


.income-table {
    grid-area: income;
}


.pay-table {
    position: relative;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    overflow: visible;
    border-radius: 13px;
    background: #fff;
}


.income-table {
    border: 1px solid #b5ddc2;
    box-shadow: 0 5px 14px rgba(16, 140, 60, .06);
}


.deduction-table {
    border: 1px solid #f0bcbc;
    box-shadow: 0 5px 14px rgba(220, 38, 38, .05);
}


/* =========================================================
   TABLE TITLE
   ========================================================= */

.table-main-title {
    position: relative;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    direction: rtl;
    border-bottom: 1px solid;
    border-radius: 13px 13px 0 0;
}


    .table-main-title > strong {
        font-size: 28px;
        font-weight: 950;
    }


.income-table .table-main-title {
    color: #07832e;
    border-bottom-color: #b9ddc4;
    background: linear-gradient( 90deg, #fff, #f3fbf5 );
}


.deduction-table .table-main-title {
    color: #cf1d1d;
    border-bottom-color: #f1c3c3;
    background: linear-gradient( 90deg, #fff, #fff3f3 );
}


/* =========================================================
   TABLE BADGE
   ========================================================= */

.table-badge {
    position: absolute;
    left: 14px;
    top: -10px;
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 6px 17px rgba(15, 23, 42, .13);
}


    .table-badge svg {
        width: 39px;
        height: 39px;
    }


.income-table .table-badge {
    color: #07832e;
    border: 1px solid #b9ddc4;
}


.deduction-table .table-badge {
    color: #d51f1f;
    border: 1px solid #efc1c1;
}


/* =========================================================
   TABLE HEADER
   ========================================================= */

.table-column-title {
    min-height: 38px;
    display: grid;
    grid-template-columns: 34% 66%;
    grid-template-areas:
        "amount title";
    direction: ltr;
    align-items: center;
    border-bottom: 1px solid;
}


    .table-column-title span:first-child {
        grid-area: title;
        direction: rtl;
        text-align: right;
        padding: 0 24px;
        font-size: 17px;
        font-weight: 950;
    }


    .table-column-title span:last-child {
        grid-area: amount;
        direction: rtl;
        text-align: right;
        padding: 0 22px;
        font-size: 17px;
        font-weight: 950;
    }


.income-table .table-column-title {
    color: #07832e;
    border-color: #cbe5d3;
    background: #fbfefc;
}


.deduction-table .table-column-title {
    color: #cf1d1d;
    border-color: #f2d0d0;
    background: #fffafa;
}


/* =========================================================
   TABLE ROWS
   ========================================================= */

.pay-row {
    min-height: 38px;
    display: grid;
    grid-template-columns: 34% 66%;
    grid-template-areas:
        "amount title";
    direction: ltr;
    align-items: center;
    border-bottom: 1px dashed;
}


    .pay-row > span {
        grid-area: title;
        position: relative;
        direction: rtl;
        text-align: right;
        padding: 0 38px 0 18px;
        color: #111827;
        font-size: 18px;
        font-weight: 850;
    }


        .pay-row > span::before {
            content: "";
            position: absolute;
            right: 22px;
            top: 50%;
            width: 6px;
            height: 6px;
            border-radius: 50%;
            transform: translateY(-50%);
        }


    .pay-row > strong {
        grid-area: amount;
        direction: rtl;
        text-align: right;
        padding: 0 22px;
        color: #111827;
        font-size: 18px;
        font-weight: 950;
        white-space: nowrap;
    }


.income-table .pay-row {
    border-color: #d5e9dc;
}


    .income-table .pay-row > span::before {
        background: #0d8d3a;
    }


.deduction-table .pay-row {
    border-color: #f1d7d7;
}


    .deduction-table .pay-row > span::before {
        background: #df1f1f;
    }


/* =========================================================
   TOTAL
   ========================================================= */

.table-total {
    position: relative;
    min-height: 62px;
    display: grid;
    grid-template-columns: 34% 1fr 46px;
    grid-template-areas:
        "amount title icon";
    direction: ltr;
    align-items: center;
    margin: auto 12px 10px;
    overflow: hidden;
    border: 1px solid;
    border-radius: 10px;
}


    .table-total > span:not(.total-side-icon) {
        grid-area: title;
        direction: rtl;
        text-align: right;
        padding: 0 18px;
        font-size: 17px;
        font-weight: 950;
    }


    .table-total > strong {
        grid-area: amount;
        direction: rtl;
        text-align: right;
        padding: 0 18px;
        font-size: 22px;
        font-weight: 950;
        white-space: nowrap;
    }


.total-side-icon {
    grid-area: icon;
    display: grid;
    place-items: center;
}


    .total-side-icon svg {
        width: 31px;
        height: 31px;
    }


.income-table .table-total {
    color: #07832e;
    border-color: #b8dfc4;
    background: #f1faf4;
}


.deduction-table .table-total {
    color: #d11f1f;
    border-color: #efbcbc;
    background: #fff4f4;
}


/* =========================================================
   SUMMARY
   ========================================================= */

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 0 14px 14px;
}


.summary-card {
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 10px 16px;
    border: 1px solid #b9cff6;
    border-radius: 10px;
    background: #fff;
}


.summary-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: grid;
    place-items: center;
    color: #0641ca;
}


    .summary-icon svg {
        width: 37px;
        height: 37px;
    }


.summary-card > div {
    min-width: 0;
    display: grid;
    gap: 4px;
}


    .summary-card > div > span {
        color: #1749b7;
        font-size: 16px;
        font-weight: 900;
    }


.summary-card strong {
    color: #0738a6;
    font-size: 21px;
    font-weight: 950;
    white-space: nowrap;
}


/* =========================================================
   PAYMENT BOTTOM
   ========================================================= */

.payment-bottom {
    display: grid;
    grid-template-columns: 430px minmax(0, 1fr);
    grid-template-areas:
        "net words";
    direction: ltr;
    gap: 14px;
    padding: 0 14px 12px;
}


/* =========================================================
   NET PAYMENT
   ========================================================= */

.net-payment-card {
    grid-area: net;
    min-height: 105px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 22px;
    direction: rtl;
    color: #fff;
    border-radius: 12px;
    background: linear-gradient( 135deg, #064dc4, #083ca7 );
    box-shadow: 0 8px 20px rgba(12, 71, 183, .20);
}


.net-icon {
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    display: grid;
    place-items: center;
    color: #fff;
}


    .net-icon svg {
        width: 58px;
        height: 58px;
    }


.net-copy {
    display: grid;
    gap: 4px;
}


    .net-copy > span {
        font-size: 17px;
        font-weight: 900;
    }


    .net-copy > div {
        display: flex;
        align-items: flex-end;
        gap: 8px;
    }


    .net-copy strong {
        font-size: 38px;
        font-weight: 950;
    }


    .net-copy small {
        padding-bottom: 5px;
        font-size: 14px;
        font-weight: 850;
    }


/* =========================================================
   WORDS
   ========================================================= */

.words-payment-card {
    grid-area: words;
    min-height: 105px;
    display: flex;
    align-items: center;
    gap: 17px;
    direction: rtl;
    padding: 14px 20px;
    border: 1px solid #b9cff6;
    border-radius: 11px;
    background: #fff;
}


.words-icon {
    width: 62px;
    height: 62px;
    flex: 0 0 62px;
    display: grid;
    place-items: center;
    color: #0641ca;
}


    .words-icon svg {
        width: 42px;
        height: 42px;
    }


.words-payment-card > div {
    min-width: 0;
    display: grid;
    gap: 6px;
}


    .words-payment-card > div > span {
        color: #1749b7;
        font-size: 16px;
        font-weight: 900;
    }


.words-payment-card strong {
    color: #111827;
    font-size: 19px;
    font-weight: 900;
    line-height: 1.9;
}


/* =========================================================
   FOOTER
   ========================================================= */

.system-footer {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 34px;
    color: #6b7890;
    font-size: 13px;
    font-weight: 750;
}


.footer-dots {
    color: #0644cb;
    letter-spacing: 6px;
}


/* =========================================================
   STATES
   ========================================================= */

.error-banner {
    margin-bottom: 13px;
    padding: 12px 14px;
    border: 1px solid var(--danger-border);
    border-radius: 11px;
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 13px;
    font-weight: 850;
}


.loading-box,
.empty-box {
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--surface-1);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 800;
}


.loading-spinner {
    width: 27px;
    height: 27px;
    border: 3px solid var(--primary-soft);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: payslip-spin .8s linear infinite;
}


@keyframes payslip-spin {

    to {
        transform: rotate(360deg);
    }
}



/* =========================================================
   BATCH PRINT SELECTION
   ========================================================= */

.batch-print-panel {
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 15px;
    background: var(--surface-1);
    box-shadow: var(--shadow-sm);
}

.batch-print-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.batch-print-heading > div:first-child {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.batch-print-kicker {
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
}

.batch-print-heading strong {
    font-size: 17px;
    font-weight: 950;
}

.batch-print-heading small {
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.7;
}

.batch-print-summary {
    min-width: 92px;
    display: grid;
    place-items: center;
    gap: 1px;
    padding: 9px 12px;
    border: 1px solid var(--primary-border);
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary);
}

.batch-print-summary span,
.batch-print-summary small {
    font-size: 10.5px;
    font-weight: 850;
}

.batch-print-summary strong {
    font-size: 22px;
    line-height: 1.05;
}

.batch-print-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.batch-select-all {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
}

.batch-select-all input,
.batch-employee-row input {
    width: 17px;
    height: 17px;
    accent-color: var(--primary);
}

.batch-clear-button,
.batch-print-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.batch-clear-button {
    border: 1px solid var(--border-color);
    background: var(--surface-1);
    color: var(--text-secondary);
}

.batch-print-button {
    margin-right: auto;
    border: 0;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, .18);
}

.batch-print-button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.batch-clear-button:disabled,
.batch-print-button:disabled,
.batch-select-all:has(input:disabled) {
    opacity: .45;
    cursor: default;
}

.batch-employee-list {
    max-height: 245px;
    overflow: auto;
    border: 1px solid var(--border-color);
    border-radius: 11px;
    background: var(--surface-2);
}

.batch-employee-row {
    display: grid;
    grid-template-columns: 24px 82px minmax(180px, 1fr) minmax(120px, .6fr);
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 6px 12px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.batch-employee-row:last-child {
    border-bottom: 0;
}

.batch-employee-row:hover {
    background: var(--primary-soft);
}

.batch-employee-code {
    color: var(--primary);
    font-size: 12.5px;
    font-weight: 950;
}

.batch-employee-name {
    min-width: 0;
    overflow: hidden;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.batch-employee-department {
    min-width: 0;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.batch-empty {
    padding: 18px;
    color: var(--text-muted);
    text-align: center;
    font-size: 13px;
    font-weight: 800;
}


/* Screen rendering wrapper */

@media screen {

    .payslip-preview-area.is-screen-mode .payslip-print-page {
        width: 210mm !important;
        height: 297mm !important;
        min-height: 297mm !important;
        max-height: 297mm !important;
        display: flex !important;
        flex-direction: column !important;
        margin: 0 !important;
        padding: 8mm 0 0 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        break-after: page !important;
        page-break-after: always !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
        background: #fff !important;
    }

    .payslip-preview-area.is-screen-mode .payslip-print-slot {
        width: 210mm !important;
        height: 144.5mm !important;
        min-height: 144.5mm !important;
        max-height: 144.5mm !important;
        flex: 0 0 144.5mm !important;
        display: flex !important;
        justify-content: center !important;
        align-items: flex-start !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
        background: #fff !important;
    }

    .payslip-preview-area.is-print-mode {
        position: fixed;
        left: -200vw;
        top: 0;
        width: 210mm;
        visibility: hidden;
        pointer-events: none;
    }
}


/* =========================================================
   RESPONSIVE FILTERS
   ========================================================= */

@media screen and (max-width: 1250px) {

    .filter-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


@media screen and (max-width: 750px) {

    .screen-header {
        flex-wrap: wrap;
    }


    .print-payslip-button {
        width: 100%;
        margin-right: 0;
    }
}


@media screen and (max-width: 650px) {

    .filter-panel {
        grid-template-columns: 1fr;
        padding: 13px;
    }
}


/* =========================================================
   RESPONSIVE PAYSLIP
   ========================================================= */

@media screen and (max-width: 0px) {

    .payslip-preview-area {
        overflow: visible;
    }


    .payslip-card {
        width: 100%;
        max-width: 100%;
        zoom: 1;
        margin: 0 auto 20px;
    }


    .slip-header {
        grid-template-columns: 240px minmax(0, 1fr) 120px;
    }


    .slip-brand-title h2 {
        font-size: 32px;
    }


    .pay-tables {
        grid-template-columns: 1fr;
        grid-template-areas:
            "income"
            "deduction";
    }


    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }


    .payment-bottom {
        grid-template-columns: 1fr;
        grid-template-areas:
            "net"
            "words";
    }
}


@media screen and (max-width: 0px) {

    .slip-header {
        grid-template-columns: 1fr;
        grid-template-areas:
            "logo"
            "title"
            "meta";
    }


    .info-row-main,
    .info-row-four,
    .info-row-three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


@media screen and (max-width: 0px) {

    .info-row-main,
    .info-row-four,
    .info-row-three {
        grid-template-columns: 1fr;
    }


    .summary-grid {
        grid-template-columns: 1fr;
    }


    .table-column-title,
    .pay-row {
        grid-template-columns: 38% 62%;
    }
}



@media screen and (max-width: 750px) {

    .batch-print-heading,
    .batch-print-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .batch-print-summary {
        width: 100%;
    }

    .batch-print-button {
        width: 100%;
        margin-right: 0;
    }

    .batch-clear-button,
    .batch-select-all {
        width: 100%;
    }

    .batch-employee-row {
        grid-template-columns: 24px 72px minmax(0, 1fr);
    }

    .batch-employee-department {
        display: none;
    }
}


/* =========================================================
   A4 PRINT
   ========================================================= */

@page {
    size: A4 portrait;
    margin: 0;
}


/* =========================================================
   PRINT - HALF A4
   ========================================================= */

@media print {

    html,
    body {
        width: 210mm !important;
        min-width: 210mm !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    .screen-header,
    .filter-panel,
    .batch-print-panel,
    .error-banner,
    .loading-box,
    .empty-box {
        display: none !important;
    }

    .payslips-page {
        width: 210mm !important;
        max-width: none !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    .payslip-preview-area {
        width: 210mm !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background: #fff !important;
    }

    .payslip-print-page {
        width: 210mm !important;
        height: 297mm !important;
        display: grid !important;
        grid-template-rows: repeat(2, 144.5mm) !important;
        margin: 0 !important;
        padding: 8mm 0 0 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        break-after: page !important;
        page-break-after: always !important;
        background: #fff !important;
    }

    .payslip-print-page:last-child {
        break-after: auto !important;
        page-break-after: auto !important;
    }

    .payslip-print-slot {
        width: 210mm !important;
        height: 144.5mm !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
        background: #fff !important;
    }

    .payslip-card {
        width: 1360px !important;
        min-width: 1360px !important;
        max-width: 1360px !important;
        margin: 0 !important;
        zoom: .52 !important;
        overflow: hidden !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        break-inside: avoid !important;
        page-break-inside: avoid !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }


    /* PRINT HEADER */

    .slip-header {
        min-height: 88px !important;
        padding: 7px 28px !important;
    }

    .slip-meta-card {
        min-height: 65px !important;
        padding: 5px 13px !important;
    }

    .slip-logo img {
        width: 98px !important;
        max-height: 70px !important;
    }


    /* PRINT EMPLOYEE INFO */

    .employee-info-card {
        margin: 0 14px 6px !important;
    }

    .info-cell {
        min-height: 49px !important;
        padding: 3px 20px !important;
    }

    .info-icon {
        width: 38px !important;
        height: 38px !important;
        flex-basis: 38px !important;
    }

    .info-icon svg {
        width: 29px !important;
        height: 29px !important;
    }


    /* PRINT TABLES */

    .pay-tables {
        gap: 18px !important;
        padding: 0 14px 6px !important;
    }

    .pay-table {
        min-height: 0 !important;
    }

    .table-main-title {
        min-height: 46px !important;
    }

    .table-column-title {
        min-height: 30px !important;
    }

    .pay-row {
        min-height: 30px !important;
    }

    .table-total {
        min-height: 48px !important;
        margin: 5px 10px 6px !important;
    }


    /* PRINT SUMMARY */

    .summary-grid {
        gap: 8px !important;
        padding: 0 14px 6px !important;
    }

    .summary-card {
        min-height: 52px !important;
        padding: 4px 13px !important;
    }

    .summary-icon {
        width: 38px !important;
        height: 38px !important;
        flex-basis: 38px !important;
    }

    .summary-icon svg {
        width: 30px !important;
        height: 30px !important;
    }


    /* PRINT BOTTOM */

    .payment-bottom {
        gap: 10px !important;
        padding: 0 14px 5px !important;
    }

    .net-payment-card,
    .words-payment-card {
        min-height: 70px !important;
        padding-top: 5px !important;
        padding-bottom: 5px !important;
    }

    .net-icon {
        width: 55px !important;
        height: 55px !important;
        flex-basis: 55px !important;
    }

    .net-icon svg {
        width: 42px !important;
        height: 42px !important;
    }

    .words-icon {
        width: 46px !important;
        height: 46px !important;
        flex-basis: 46px !important;
    }

    .words-icon svg {
        width: 33px !important;
        height: 33px !important;
    }

    .words-payment-card strong {
        line-height: 1.45 !important;
    }


    /* PRINT FOOTER */

    .system-footer {
        min-height: 21px !important;
        font-size: 10px !important;
    }


    /* PRINT COLORS */

    .income-table,
    .deduction-table,
    .summary-card,
    .net-payment-card,
    .words-payment-card,
    .employee-info-card,
    .table-total {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

/* =========================================================
   PAYSLIP SVG SPRITE
   یک تعریف برای همه آیکن‌های تکراری فیش‌ها
   ========================================================= */

.payslip-svg-sprite {
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

.payslip-card svg use {
    pointer-events: none;
}




/* Same physical size as print */
        width: 190mm !important;
        min-width: 190mm !important;
        max-width: 190mm !important;

        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;

        margin: 0 auto !important;
        overflow: visible !important;
        box-sizing: border-box !important;
    }

    .payslip-preview-area > .payslip-card,
    .payslip-preview-area > .payslip-card * {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}
/* PRINT HEADER */
    .payslips-page .payslip-preview-area .slip-header {
        min-height: 88px !important;
        padding: 7px 28px !important;
    }

    .payslips-page .payslip-preview-area .slip-meta-card {
        min-height: 65px !important;
        padding: 5px 13px !important;
    }

    .payslips-page .payslip-preview-area .slip-logo img {
        width: 98px !important;
        max-height: 70px !important;
    }

    /* PRINT EMPLOYEE INFO */
    .payslips-page .payslip-preview-area .employee-info-card {
        margin: 0 14px 6px !important;
    }

    .payslips-page .payslip-preview-area .info-cell {
        min-height: 49px !important;
        padding: 3px 20px !important;
    }

    .payslips-page .payslip-preview-area .info-icon {
        width: 38px !important;
        height: 38px !important;
        flex-basis: 38px !important;
    }

    .payslips-page .payslip-preview-area .info-icon svg {
        width: 29px !important;
        height: 29px !important;
    }

    /* PRINT TABLES */
    .payslips-page .payslip-preview-area .pay-tables {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        grid-template-areas: "deduction income" !important;
        gap: 18px !important;
        padding: 0 14px 6px !important;
    }

    .payslips-page .payslip-preview-area .pay-table {
        min-height: 0 !important;
    }

    .payslips-page .payslip-preview-area .table-main-title {
        min-height: 46px !important;
    }

    .payslips-page .payslip-preview-area .table-column-title {
        min-height: 30px !important;
        grid-template-columns: 34% 66% !important;
    }

    .payslips-page .payslip-preview-area .pay-row {
        min-height: 30px !important;
        grid-template-columns: 34% 66% !important;
    }

    .payslips-page .payslip-preview-area .table-total {
        min-height: 48px !important;
        margin: 5px 10px 6px !important;
    }

    /* PRINT SUMMARY */
    .payslips-page .payslip-preview-area .summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 8px !important;
        padding: 0 14px 6px !important;
    }

    .payslips-page .payslip-preview-area .summary-card {
        min-height: 52px !important;
        padding: 4px 13px !important;
    }

    .payslips-page .payslip-preview-area .summary-icon {
        width: 38px !important;
        height: 38px !important;
        flex-basis: 38px !important;
    }

    .payslips-page .payslip-preview-area .summary-icon svg {
        width: 30px !important;
        height: 30px !important;
    }

    /* PRINT BOTTOM */
    .payslips-page .payslip-preview-area .payment-bottom {
        grid-template-columns: 1fr 1.55fr !important;
        grid-template-areas: "net words" !important;
        gap: 10px !important;
        padding: 0 14px 5px !important;
    }

    .payslips-page .payslip-preview-area .net-payment-card,
    .payslips-page .payslip-preview-area .words-payment-card {
        min-height: 70px !important;
        padding-top: 5px !important;
        padding-bottom: 5px !important;
    }

    .payslips-page .payslip-preview-area .net-icon {
        width: 55px !important;
        height: 55px !important;
        flex-basis: 55px !important;
    }

    .payslips-page .payslip-preview-area .net-icon svg {
        width: 42px !important;
        height: 42px !important;
    }

    .payslips-page .payslip-preview-area .words-icon {
        width: 46px !important;
        height: 46px !important;
        flex-basis: 46px !important;
    }

    .payslips-page .payslip-preview-area .words-icon svg {
        width: 33px !important;
        height: 33px !important;
    }

    .payslips-page .payslip-preview-area .words-payment-card strong {
        line-height: 1.45 !important;
    }

    /* PRINT FOOTER */
    .payslips-page .payslip-preview-area .system-footer {
        min-height: 21px !important;
        font-size: 10px !important;
    }

    /* PRINT COLORS */
    .payslips-page .payslip-preview-area .income-table,
    .payslips-page .payslip-preview-area .deduction-table,
    .payslips-page .payslip-preview-area .summary-card,
    .payslips-page .payslip-preview-area .net-payment-card,
    .payslips-page .payslip-preview-area .words-payment-card,
    .payslips-page .payslip-preview-area .employee-info-card,
    .payslips-page .payslip-preview-area .table-total {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}
/* Keep the same print-size geometry from v11,
       but let the card grow enough to include payment-bottom. */
    .payslips-page .payslip-preview-area {
        height: auto !important;
        min-height: max-content !important;
        max-height: none !important;
        overflow: visible !important;
        padding-bottom: 24px !important;
    }

    .payslips-page .payslip-preview-area .payslip-card {
        height: auto !important;
        min-height: max-content !important;
        max-height: none !important;
        overflow: visible !important;
        padding-bottom: 10px !important;
    }

    .payslips-page .payslip-preview-area .payment-bottom {
        position: static !important;
        float: none !important;
        clear: both !important;
        display: grid !important;
        visibility: visible !important;
        opacity: 1 !important;
        overflow: visible !important;
        margin-bottom: 6px !important;
    }

    .payslips-page .payslip-preview-area .net-payment-card,
    .payslips-page .payslip-preview-area .words-payment-card {
        position: static !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        overflow: visible !important;
    }

    .payslips-page .payslip-preview-area .system-footer {
        position: static !important;
        clear: both !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* Make sure no ancestor inside the payslip clips the last section. */
    .payslips-page .payslip-preview-area .summary-grid,
    .payslips-page .payslip-preview-area .payment-bottom,
    .payslips-page .payslip-preview-area .net-payment-card,
    .payslips-page .payslip-preview-area .words-payment-card,
    .payslips-page .payslip-preview-area .system-footer {
        max-height: none !important;
        clip-path: none !important;
        contain: none !important;
    }
}

/* HR-PAYSLIP-FINAL-REPAIR-V21
   Stable on-screen payslip repair based on the user's known-good Razor. */
@media screen {

    /* Compact top area */
    .payslips-page .screen-header {
        min-height: 56px !important;
        gap: 9px !important;
        margin-bottom: 8px !important;
        padding: 8px 11px !important;
        border-radius: 12px !important;
    }

    .payslips-page .screen-header-icon {
        width: 40px !important;
        height: 40px !important;
        flex: 0 0 40px !important;
        border-radius: 10px !important;
    }

    .payslips-page .screen-header-icon svg {
        width: 22px !important;
        height: 22px !important;
    }

    .payslips-page .screen-header-copy > span {
        font-size: 10.5px !important;
    }

    .payslips-page .screen-header h1 {
        font-size: 18px !important;
        line-height: 1.15 !important;
    }

    .payslips-page .screen-header p {
        display: none !important;
    }

    .payslips-page .print-payslip-button {
        min-width: 104px !important;
        height: 36px !important;
        padding: 0 11px !important;
        font-size: 11.5px !important;
    }

    .payslips-page .filter-panel {
        grid-template-columns: 82px 105px 145px minmax(210px, 1fr) minmax(225px, 1fr) !important;
        gap: 7px !important;
        margin-bottom: 8px !important;
        padding: 8px 9px !important;
        border-radius: 11px !important;
    }

    .payslips-page .filter-field {
        grid-template-rows: auto 35px !important;
        gap: 3px !important;
    }

    .payslips-page .filter-caption {
        font-size: 11px !important;
        line-height: 1.15 !important;
    }

    .payslips-page .filter-panel select,
    .payslips-page .employee-search-box,
    .payslips-page .employee-search-box input {
        height: 35px !important;
        min-height: 35px !important;
    }

    /* Keep batch print compact without changing Razor structure */
    .payslips-page .batch-print-panel {
        margin-bottom: 8px !important;
        padding: 8px 10px !important;
        border-radius: 11px !important;
    }

    .payslips-page .batch-print-heading {
        margin-bottom: 6px !important;
    }

    .payslips-page .batch-print-heading small {
        display: none !important;
    }

    .payslips-page .batch-print-toolbar {
        margin-bottom: 6px !important;
        gap: 6px !important;
    }

    .payslips-page .batch-select-all,
    .payslips-page .batch-clear-button,
    .payslips-page .batch-print-button {
        min-height: 34px !important;
        height: 34px !important;
        font-size: 11.5px !important;
        padding: 0 10px !important;
    }

    .payslips-page .batch-employee-list {
        max-height: 72px !important;
    }

    .payslips-page .batch-employee-row {
        min-height: 32px !important;
        padding: 3px 9px !important;
    }

    /* Full current payslip, no bottom clipping */
    .payslips-page .payslip-preview-area.is-screen-mode {
        width: 210mm !important;
        min-width: 210mm !important;
        max-width: 210mm !important;
        display: block !important;
        margin: 0 auto !important;
        padding: 8mm 0 18px !important;
        overflow: visible !important;
        background: #fff !important;
    }

    .payslips-page .payslip-preview-area.is-screen-mode .payslip-print-page {
        width: 210mm !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background: #fff !important;
    }

    .payslips-page .payslip-preview-area.is-screen-mode .payslip-print-slot {
        width: 210mm !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        display: flex !important;
        align-items: flex-start !important;
        justify-content: center !important;
        flex: none !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        background: #fff !important;
    }

    .payslips-page .payslip-preview-area.is-screen-mode
    .payslip-print-slot > .payslip-card {
        width: 1360px !important;
        min-width: 1360px !important;
        max-width: 1360px !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        margin: 0 !important;
        zoom: .584 !important;
        transform: none !important;
        overflow: visible !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    /* Match the compact print geometry on screen */
    .payslips-page .payslip-preview-area.is-screen-mode .slip-header {
        min-height: 88px !important;
        padding: 7px 28px !important;
    }

    .payslips-page .payslip-preview-area.is-screen-mode .slip-meta-card {
        min-height: 65px !important;
        padding: 5px 13px !important;
    }

    .payslips-page .payslip-preview-area.is-screen-mode .slip-logo img {
        width: 98px !important;
        max-height: 70px !important;
    }

    .payslips-page .payslip-preview-area.is-screen-mode .employee-info-card {
        margin: 0 14px 6px !important;
    }

    .payslips-page .payslip-preview-area.is-screen-mode .info-cell {
        min-height: 49px !important;
        padding: 3px 20px !important;
    }

    .payslips-page .payslip-preview-area.is-screen-mode .info-icon {
        width: 38px !important;
        height: 38px !important;
        flex-basis: 38px !important;
    }

    .payslips-page .payslip-preview-area.is-screen-mode .info-icon svg {
        width: 29px !important;
        height: 29px !important;
    }

    .payslips-page .payslip-preview-area.is-screen-mode .pay-tables {
        gap: 18px !important;
        padding: 0 14px 6px !important;
    }

    .payslips-page .payslip-preview-area.is-screen-mode .pay-table {
        min-height: 0 !important;
    }

    .payslips-page .payslip-preview-area.is-screen-mode .table-main-title {
        min-height: 46px !important;
    }

    .payslips-page .payslip-preview-area.is-screen-mode .table-column-title,
    .payslips-page .payslip-preview-area.is-screen-mode .pay-row {
        min-height: 30px !important;
    }

    .payslips-page .payslip-preview-area.is-screen-mode .table-total {
        min-height: 48px !important;
        margin: 5px 10px 6px !important;
    }

    .payslips-page .payslip-preview-area.is-screen-mode .summary-grid {
        gap: 8px !important;
        padding: 0 14px 6px !important;
    }

    .payslips-page .payslip-preview-area.is-screen-mode .summary-card {
        min-height: 52px !important;
        padding: 4px 13px !important;
    }

    .payslips-page .payslip-preview-area.is-screen-mode .payment-bottom {
        gap: 10px !important;
        padding: 0 14px 5px !important;
        overflow: visible !important;
    }

    .payslips-page .payslip-preview-area.is-screen-mode .net-payment-card,
    .payslips-page .payslip-preview-area.is-screen-mode .words-payment-card {
        min-height: 70px !important;
        padding-top: 5px !important;
        padding-bottom: 5px !important;
        overflow: visible !important;
    }

    .payslips-page .payslip-preview-area.is-screen-mode .system-footer {
        min-height: 21px !important;
        font-size: 10px !important;
    }
}

/* Print-only wider/centered payslip */
@media print {
    .payslip-print-slot {
        display: flex !important;
        align-items: flex-start !important;
        justify-content: center !important;
    }

    .payslip-print-slot > .payslip-card {
        width: 1390px !important;
        min-width: 1390px !important;
        max-width: 1390px !important;
        flex: 0 0 1390px !important;
        zoom: .52 !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* HR-PAYSLIP-V25-STABLE-SCREEN */
@media screen {
    .payslips-page .screen-header {
        min-height: 52px !important;
        gap: 9px !important;
        margin-bottom: 8px !important;
        padding: 8px 11px !important;
        border-radius: 12px !important;
    }

    .payslips-page .screen-header-icon {
        width: 36px !important;
        height: 36px !important;
        flex: 0 0 36px !important;
        border-radius: 10px !important;
    }

    .payslips-page .screen-header-icon svg {
        width: 20px !important;
        height: 20px !important;
    }

    .payslips-page .screen-header-copy > span {
        font-size: 10.5px !important;
    }

    .payslips-page .screen-header h1 {
        margin: 0 !important;
        font-size: 17px !important;
        line-height: 1.2 !important;
    }

    .payslips-page .screen-header p {
        display: none !important;
    }

    .payslips-page .print-payslip-button {
        min-width: 106px !important;
        height: 33px !important;
        padding: 0 10px !important;
        font-size: 11.5px !important;
    }

    .payslips-page .filter-panel {
        gap: 7px !important;
        margin-bottom: 8px !important;
        padding: 8px 9px !important;
        border-radius: 11px !important;
    }

    .payslips-page .filter-field {
        grid-template-rows: auto 32px !important;
        gap: 3px !important;
    }

    .payslips-page .filter-panel select,
    .payslips-page .employee-search-box,
    .payslips-page .employee-search-box input {
        min-height: 32px !important;
        height: 32px !important;
    }

    .payslips-page .batch-print-panel {
        margin-bottom: 8px !important;
        padding: 8px 10px !important;
        border-radius: 11px !important;
    }

    .payslips-page .batch-print-heading {
        margin-bottom: 5px !important;
    }

    .payslips-page .batch-print-heading small {
        display: none !important;
    }

    .payslips-page .batch-print-toolbar {
        margin-bottom: 5px !important;
        gap: 6px !important;
    }

    .payslips-page .batch-select-all,
    .payslips-page .batch-clear-button,
    .payslips-page .batch-print-button {
        min-height: 33px !important;
        height: 33px !important;
        padding: 0 10px !important;
        font-size: 11px !important;
    }

    .payslips-page .batch-employee-list {
        max-height: 56px !important;
    }

    .payslips-page .batch-employee-row {
        min-height: 31px !important;
        padding-block: 3px !important;
    }

    .payslips-page .payslip-preview-area.is-screen-mode {
        width: 210mm !important;
        min-width: 210mm !important;
        max-width: 210mm !important;
        margin: 0 auto !important;
        padding: 8mm 0 20px !important;
        overflow: visible !important;
        background: #fff !important;
    }

    .payslips-page .payslip-preview-area.is-screen-mode .payslip-print-page {
        width: 210mm !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .payslips-page .payslip-preview-area.is-screen-mode .payslip-print-slot {
        width: 210mm !important;
        height: 146mm !important;
        min-height: 146mm !important;
        max-height: 146mm !important;
        display: flex !important;
        flex: none !important;
        align-items: flex-start !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    .payslips-page .payslip-preview-area.is-screen-mode .payslip-print-slot > .payslip-card {
        width: 1360px !important;
        min-width: 1360px !important;
        max-width: 1360px !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        margin: 0 !important;
        zoom: 1 !important;
        transform: scale(.584) !important;
        transform-origin: top center !important;
        overflow: visible !important;
        box-shadow: none !important;
    }
}

/* V25: a little wider and centered in the two-per-A4 print layout. */
@media print {
    .payslips-page .payslip-print-slot {
        display: flex !important;
        align-items: flex-start !important;
        justify-content: center !important;
    }

    .payslips-page .payslip-print-slot > .payslip-card {
        width: 1390px !important;
        min-width: 1390px !important;
        max-width: 1390px !important;
        flex: 0 0 1390px !important;
        margin-inline: auto !important;
        zoom: .52 !important;
    }
}

/* HR-PAYSLIP-V27-A4-A5-PRINT */
@media screen {
    .payslips-page .payslip-paper-size,
    .payslips-page .batch-paper-size {
        min-height: 33px;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 0 7px;
        border: 1px solid var(--border-color);
        border-radius: 9px;
        background: var(--surface-2);
        color: var(--text-muted);
        font-size: 10.5px;
        font-weight: 850;
    }
    .payslips-page .payslip-paper-size select,
    .payslips-page .batch-paper-size select {
        height: 27px;
        min-height: 27px;
        border: 1px solid var(--border-color);
        border-radius: 7px;
        padding: 0 7px;
        background: var(--surface-1);
        color: var(--text-primary);
        font: inherit;
        font-size: 10.5px;
        font-weight: 850;
    }
}

@media print {
    .payslips-page.print-paper-a4 .payslip-print-page {
        width: 210mm !important;
        height: 297mm !important;
        min-height: 297mm !important;
        max-height: 297mm !important;
        padding: 4mm 5mm 0 !important;
        box-sizing: border-box !important;
    }
    .payslips-page.print-paper-a4 .payslip-print-slot {
        width: 200mm !important;
        height: 144.5mm !important;
        min-height: 144.5mm !important;
        max-height: 144.5mm !important;
        flex: 0 0 144.5mm !important;
        margin: 0 auto !important;
        display: flex !important;
        align-items: flex-start !important;
        justify-content: center !important;
    }
    .payslips-page.print-paper-a5 .payslip-print-page {
        width: 210mm !important;
        height: 148mm !important;
        min-height: 148mm !important;
        max-height: 148mm !important;
        padding: 3mm 5mm 0 !important;
        box-sizing: border-box !important;
    }
    .payslips-page.print-paper-a5 .payslip-print-slot {
        width: 200mm !important;
        height: 142mm !important;
        min-height: 142mm !important;
        max-height: 142mm !important;
        flex: 0 0 142mm !important;
        margin: 0 auto !important;
        display: flex !important;
        align-items: flex-start !important;
        justify-content: center !important;
    }
    .payslips-page.print-paper-a4 .payslip-print-slot > .payslip-card,
    .payslips-page.print-paper-a5 .payslip-print-slot > .payslip-card {
        width: 1360px !important;
        min-width: 1360px !important;
        max-width: 1360px !important;
        flex: 0 0 1360px !important;
        margin: 0 auto !important;
        zoom: .52 !important;
        transform: none !important;
        overflow: hidden !important;
    }
}

/* HR-SHARED-EXACT-PAYSLIP-V3-4 */
.shared-payslip-document {
    width: 100%;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: transparent !important;
}

.shared-payslip-document .payslip-preview-area.is-screen-mode {
    margin: 0 auto !important;
}
