:root {
    --bg: #eff2f5;
    --card: #fff;
    --text: #222a34;
    --muted: #717986;
    --line: #dde2e8;
    --blue: #2778bd;
    --primary: #285fce;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
    background: var(--bg);
    color: var(--text);
}

.wrap {
    max-width: 1100px;
    margin: auto;
    padding:
        0
        24px;
}

.pay-header {
    background: white;
    border-bottom:
        1px solid
        var(--line);
}

.header-content {
    min-height: 65px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.back {
    color: var(--primary);
    text-decoration: none;
}

.pay-intro {
    padding:
        48px
        0
        20px;
}

.pay-intro h1 {
    font-size: 45px;
    margin:
        0
        0
        8px;
}

.pay-intro p {
    color: var(--muted);
}

.pay-card {
    background: white;
    padding: 25px;
    border-radius: 17px;
    margin-bottom: 16px;
    border:
        1px solid
        var(--line);
}

.pay-card h2 {
    margin-top: 0;
}

.form-grid {
    display: grid;
    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );
    gap: 17px;
}

label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
}

input,
select {
    width: 100%;
    padding: 12px;
    border:
        1px solid
        #cdd5df;
    border-radius: 9px;
    font: inherit;
}

.checks {
    margin-top: 19px;
    display: grid;
    grid-template-columns:
        repeat(
            2,
            1fr
        );
    gap: 10px;
}

.checks label {
    flex-direction: row;
}

.checks input {
    width: auto;
}

.calculate {
    width: 100%;
    border: 0;
    background: var(--primary);
    color: white;
    padding: 15px;
    border-radius: 10px;
    font-weight: bold;
    margin-bottom: 35px;
}

.print-actions {
    max-width: 920px;
    margin:
        20px
        auto
        10px;
    text-align: right;
}

.payslip {
    max-width: 920px;
    margin:
        0
        auto
        60px;
    background: white;
    box-shadow:
        0 14px 45px
        rgba(
            20,
            30,
            45,
            .10
        );
}

.payslip > header {
    padding:
        40px
        45px;
    display: flex;
    justify-content: space-between;
}

.payslip > header span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.payslip-summary {
    display: grid;
    grid-template-columns:
        1fr
        1fr
        1fr;
    background: #f7f8fa;
    padding:
        20px
        45px;
}

.payslip-summary span {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.payout {
    text-align: right;
}

.payout strong {
    color: var(--blue);
    font-size: 22px;
}

.pay-table {
    width:
        calc(
            100% - 90px
        );
    margin:
        25px
        45px
        40px;
    border-collapse: collapse;
}

.pay-table th,
.pay-table td {
    padding:
        8px
        6px;
    text-align: right;
    font-size: 12px;
}

.pay-table th:first-child,
.pay-table td:first-child {
    text-align: left;
}

.pay-table thead th {
    border-bottom:
        1px solid
        var(--line);
}

.pay-table tfoot th {
    border-top:
        1px solid
        var(--line);
    padding-top: 13px;
}

.bottom-grid {
    background: #f7f8fa;
    padding:
        27px
        45px;
    display: grid;
    grid-template-columns:
        repeat(
            3,
            1fr
        );
    gap: 35px;
}

.bottom-grid section {
    border-left:
        3px solid
        var(--blue);
    padding-left: 12px;
}

.bottom-grid h3 {
    font-size: 11px;
}

.bottom-grid p {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 10px;
}

.error {
    background: #fff0f0;
    color: #a32323;
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 15px;
}

@media (
    max-width: 700px
) {

    .form-grid,
    .checks,
    .bottom-grid,
    .payslip-summary {
        grid-template-columns:
            1fr;
    }

    .payout {
        text-align: left;
    }

    .pay-table {
        width:
            calc(
                100% - 30px
            );
        margin:
            20px
            15px;
    }
}

@media print {

    @page {
        size: A4;
        margin: 8mm;
    }

    body {
        background: white;
    }

    .no-print,
    .pay-header,
    .pay-form {
        display: none !important;
    }

    .wrap {
        max-width: none;
        padding: 0;
    }

    .payslip {
        box-shadow: none;
        margin: 0;
        max-width: none;
    }
}