.payments-page {
    display: grid;
    grid-template-columns: 1fr minmax(430px, 450px);
    gap: 16px;
}

.payment-plan {
    margin-top: 16px;
    display: flex;
    align-items: flex-start;
    padding: 24px 28px;
    border: 1px solid var(--color-boarder, #e6e6e6);
    border-radius: 8px;
    background: #fff;
    flex-direction: column;
    gap: 16px;
    align-self: stretch;

    .payment-plan-content {
        display: flex;
        align-items: flex-start;
        border: 1px solid var(--Bg-boarder, #e6e6e6);
        border-radius: 8px;
        overflow: hidden;
        flex-direction: column;
        align-self: stretch;

        .payment-plan-head {
            width: 100%;
            background: var(--Bg-island_light, #fafbfc);
            color: var(--Text-secondary_inverse, #8f9297);
            border-bottom: 1px solid var(--Bg-boarder, #e6e6e6);
        }

        .payment-plan-body {
            width: 100%;
            font-size: 13px;
        }
    }
}

.payments-details {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    min-height: 240px;
    padding: 20px 24px 44px;
    border: 1px solid var(--color-boarder, #e6e6e6);
    border-radius: 12px;
    background: var(--color-island, #fff);
    align-self: stretch;
}

.receipts {
    display: flex;
    height: fit-content;
    padding: 24px 28px;
    border: 1px solid var(--color-boarder, #e6e6e6);
    border-radius: 8px;
    background: #fff;
    flex-direction: column;
    gap: 20px;

    .receipts-content {
        border: 1px solid var(--Bg-boarder, #e6e6e6);
        border-radius: 8px;
        overflow: hidden;

        .receipts-head {
            padding: 0 20px;
            background: var(--Bg-island_light, #fafbfc);
            color: var(--Text-secondary_inverse, #8f9297);
            border-bottom: 1px solid var(--Bg-boarder, #e6e6e6);
        }

        .receipts-body {
            padding: 0 20px;
        }
    }

    .receipts-totals {
        display: flex;
        align-items: flex-start;
        padding: 8px 20px;
        border: 1px solid var(--Bg-boarder, #e6e6e6);
        border-radius: 8px;
        background: var(--Bg-island_light, #fafbfc);
        flex-direction: column;
        gap: 4px;
        align-self: stretch;

        .receipts-totals__items {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
            height: 32px;
            font-size: 12px;
            font-weight: 400;
            line-height: 16px;
            font-style: normal;
            border-bottom: 1px solid var(--Bg-boarder, #e6e6e6);

            &:last-child {
                border: none;
            }

            .receipts-totals__items__label {

            }

            .receipts-totals__items__value {
                font-weight: 500;
            }
        }
    }
}

.receipts-item {
    display: grid;
    align-items: center;
    grid-template-columns: 92px 1fr 128px;
    height: 36px;
}

.data {
    width: 100%;
    text-align: left;
}

.comment {
    width: 100%;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sum {
    width: 100%;
    text-align: right;
}

.payment-header {
    margin: 0;
    font-size: 18px;
    font-style: normal;
    font-weight: 600;
    line-height: 24px; /* 133.333% */
}

.payment-plan-item {
    position: relative;
    display: grid;
    align-items: center;
    grid-template-columns: 32px 1fr 140px 88px 134px;
    min-height: 36px;
    padding: 0 16px;
    border-bottom: 1px solid var(--Bg-boarder, #e6e6e6);

    &:last-child {
        border: none;
    }

    .completed {
        position: absolute;
        top: 50%;
        right: 16px;
        width: 16px;
        height: 16px;
        transform: translateY(-50%);
    }
}

.serial-number {
    width: 100%;
    text-align: center;
}

.payment-plan-description {
    width: 100%;
    padding: 10px 10px 10px 12px;
    text-align: left;
}

.payment-plan-data {
    width: 100%;
    text-align: center;
}

.payment-plan-percent {
    width: 100%;
    text-align: center;
}

.payment-plan-sum {
    width: 100%;
    text-align: center;
}

.payments-details-name {
    font-size: 18px !important;
    font-style: normal;
    font-weight: 600;
    line-height: 24px; /* 133.333% */
    margin-bottom: 8px;

    h3 {
        margin: 0;
        font-size: 18px !important;
    }
}

@media (max-width: 890px) {
    .receipts-totals {
        min-width: 360px;
    }

    .receipts-content,
    .payment-plan-content {
        min-width: 400px;
    }

    .payment-plan-content {
        min-width: 600px;
    }

    .payments-page {
        display: flex;
        flex-direction: column;
    }

    .payments-page > div {
        display: contents;
    }

    .payments-details {
        order: 1;
    }

    .receipts {
        order: 2;
        overflow: auto;
    }

    .payment-plan {
        order: 3;
        overflow: auto;
    }
}

@media (max-width: 560px) {
    .payments-details {
        flex-direction: column-reverse;
        gap: 16px;
        height: auto;
    }

    .navbar__item--tab {
        white-space: nowrap;
        padding: 0 22px !important;
    }
}
