/* =========================================================
   BENEFICIARIES PAGE
   ========================================================= */

.beneficiaries-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;
}

.beneficiaries-page-title {
    margin: 0;

    color: #343a40;

    font-size: 1.35rem;
    font-weight: 600;
}
.beneficiary-field-error {
    color: #dc3545;
    font-size: .875rem;
    margin-top: .25rem;
}
.beneficiaries-page-subtitle {
    margin: 4px 0 0;

    color: #96a0a6;

    font-size: 0.8rem;
}

.beneficiaries-add-btn {
    min-height: 46px;

    padding-left: 22px;
    padding-right: 22px;

    border-radius: 23px;

    font-weight: 600;

    white-space: nowrap;
}


/* =========================================================
   CARD
   ========================================================= */

.beneficiaries-card {
    overflow: hidden;

    background: #fff;

    border: 1px solid #edf0f2;
    border-radius: 12px;

    box-shadow:
            0 3px 12px rgba(30, 40, 50, 0.05);
}


/* =========================================================
   ITEM
   ========================================================= */

.beneficiary-item {
    display: grid;

    grid-template-columns:
        54px
        minmax(0, 1fr)
        minmax(150px, 220px)
        auto;

    align-items: center;

    gap: 16px;

    min-height: 86px;

    padding: 16px 20px;

    border-bottom: 1px solid #edf0f2;

    cursor: pointer;

    transition:
            background-color 0.15s ease,
            box-shadow 0.15s ease;
}

.beneficiary-item:last-child {
    border-bottom: 0;
}

@media (hover: hover) {

    .beneficiary-item:hover {
        background:
                rgba(111, 66, 193, 0.025);

        box-shadow:
                inset 3px 0 0
                rgba(111, 66, 193, 0.55);
    }

}


/* =========================================================
   AVATAR
   ========================================================= */

.beneficiary-avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;

    color: #7441d4;

    background: #f3eefd;

    border-radius: 12px;

    font-size: 0.9rem;
    font-weight: 700;
}


/* =========================================================
   NAME / COUNTRY
   ========================================================= */

.beneficiary-main {
    min-width: 0;
}

.beneficiary-name {
    overflow: hidden;

    color: #343a40;

    font-size: 0.95rem;
    font-weight: 600;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.beneficiary-meta {
    display: flex;
    align-items: center;

    gap: 6px;

    margin-top: 5px;

    color: #96a0a6;

    font-size: 0.74rem;
}

.beneficiary-country-flag {
    flex: 0 0 auto;
}

.beneficiary-country {
    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* =========================================================
   PHONE
   ========================================================= */

.beneficiary-phone {
    min-width: 0;
}

.beneficiary-phone-label {
    display: block;

    margin-bottom: 3px;

    color: #9aa3a8;

    font-size: 0.62rem;
    font-weight: 700;

    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.beneficiary-phone-value {
    display: block;

    overflow: hidden;

    color: #414345;

    font-size: 0.86rem;
    font-weight: 600;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* =========================================================
   ACTIONS
   ========================================================= */

.beneficiary-actions {
    display: flex;
    align-items: center;

    gap: 10px;
}

.beneficiary-edit-btn {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    color: #7441d4;

    background: #f3eefd;

    border-radius: 10px;

    text-decoration: none;

    transition:
            background-color 0.15s ease,
            transform 0.15s ease;
}

.beneficiary-edit-btn:hover {
    color: #6533c1;

    background: #ebe3fa;

    transform: translateY(-1px);
}

.beneficiary-view-arrow {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 26px;

    color: #bcc4c9;

    font-size: 0.7rem;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767.98px) {

    .beneficiaries-page-header {
        align-items: stretch;
        flex-direction: column;

        gap: 14px;
    }

    .beneficiaries-add-btn {
        width: 100%;
    }


    .beneficiary-item {
        grid-template-columns:
            44px
            minmax(0, 1fr)
            auto;

        gap: 11px;

        padding: 14px;
    }


    .beneficiary-avatar {
        width: 40px;
        height: 40px;

        border-radius: 10px;

        font-size: 0.8rem;
    }


    .beneficiary-phone {
        grid-column: 2 / 3;

        margin-top: -7px;
    }

    .beneficiary-phone-label {
        display: none;
    }

    .beneficiary-phone-value {
        color: #8e999f;

        font-size: 0.72rem;
        font-weight: 400;
    }


    .beneficiary-actions {
        grid-column: 3;
        grid-row: 1 / span 2;

        align-self: center;
    }


    .beneficiary-view-arrow {
        display: none;
    }

}


@media (max-width: 575.98px) {

    .beneficiaries-page-title {
        font-size: 1.1rem;
    }

    .beneficiaries-page-subtitle {
        font-size: 0.72rem;
    }


    .beneficiary-edit-btn {
        width: 34px;
        height: 34px;
    }

}

/* =========================================================
   BENEFICIARY MODAL
   ========================================================= */

#add-recipient-detail .modal-dialog {
    max-width: 760px;
}


#add-recipient-detail .profile-edit-actions {
    align-items: center;
    justify-content: space-between;
}


.recipient-required-note {
    color: #8f999f;

    font-size: 0.72rem;
}


.recipient-modal-actions {
    display: flex;
    align-items: center;

    gap: 10px;

    margin-left: auto;
}


@media (max-width: 575.98px) {

    #add-recipient-detail .profile-edit-actions {
        align-items: stretch;
        flex-direction: column;
    }


    .recipient-modal-actions {
        width: 100%;

        flex-direction: column-reverse;

        margin-left: 0;
    }


    .recipient-modal-actions .btn {
        width: 100%;
    }

}

/* =========================================================
   BENEFICIARY VIEW MODAL
   ========================================================= */

.beneficiary-view-modal .modal-dialog {
    max-width: 620px;
}

.beneficiary-view-content {
    overflow: hidden;

    border: 0;
    border-radius: 18px;

    box-shadow:
            0 24px 70px rgba(28, 22, 44, 0.22);
}


/* HEADER */

.beneficiary-view-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;

    padding: 22px 24px 18px;

    border-bottom: 1px solid #edf0f2;
}

.beneficiary-view-header h5 {
    margin: 0;

    color: #343a40;

    font-size: 1.15rem;
    font-weight: 600;
}

.beneficiary-view-header p {
    margin: 4px 0 0;

    color: #96a0a6;

    font-size: 0.74rem;
}

.beneficiary-view-header .btn-close {
    flex: 0 0 auto;

    margin-top: 2px;

    opacity: 0.55;
}


/* BODY */

.beneficiary-view-body {
    padding: 22px 24px 24px;
}


/* IDENTITY */

.beneficiary-view-identity {
    display: flex;
    align-items: center;

    gap: 14px;

    padding: 16px;

    background:
            linear-gradient(
                    135deg,
                    rgba(116, 65, 212, 0.06),
                    rgba(116, 65, 212, 0.015)
            );

    border: 1px solid #eadffc;
    border-radius: 13px;
}

.beneficiary-view-avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 54px;
    height: 54px;

    color: #7441d4;

    background: #fff;

    border-radius: 14px;

    font-size: 1rem;
    font-weight: 700;

    box-shadow:
            0 4px 14px rgba(74, 48, 120, 0.08);
}

.beneficiary-view-person {
    min-width: 0;
}

.beneficiary-view-person h4 {
    margin: 0;

    color: #343a40;

    font-size: 1rem;
    font-weight: 600;
}

.beneficiary-view-location {
    display: flex;
    align-items: center;

    gap: 6px;

    margin-top: 5px;

    color: #8f999f;

    font-size: 0.74rem;
}

.beneficiary-view-separator {
    margin: 0 3px;
}


/* SECTIONS */

.beneficiary-view-section {
    margin-top: 22px;
}

.beneficiary-view-section-title {
    margin-bottom: 10px;

    color: #929ca2;

    font-size: 0.68rem;
    font-weight: 700;

    letter-spacing: 0.08em;
    text-transform: uppercase;
}


/* GRID */

.beneficiary-view-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 10px;
}

.beneficiary-view-info {
    display: flex;
    align-items: center;

    min-width: 0;

    gap: 10px;

    padding: 13px;

    background: #fafbfc;

    border: 1px solid #e8ecef;
    border-radius: 11px;
}

.beneficiary-view-info-wide {
    grid-column: 1 / -1;
}


/* ICON */

.beneficiary-view-info-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 36px;
    height: 36px;

    color: #7441d4;

    background: #f3eefd;

    border-radius: 9px;

    font-size: 0.82rem;
}


/* LABEL / VALUE */

.beneficiary-view-label {
    display: block;

    margin-bottom: 2px;

    color: #99a2a8;

    font-size: 0.6rem;
    font-weight: 700;

    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.beneficiary-view-value {
    display: block;

    overflow-wrap: anywhere;

    color: #414345;

    font-size: 0.8rem;
    font-weight: 600;
}


/* MOBILE */

@media (max-width: 575.98px) {

    .beneficiary-view-modal .modal-dialog {
        margin: 12px;
    }

    .beneficiary-view-header {
        padding: 18px 17px 15px;
    }

    .beneficiary-view-body {
        padding: 17px;
    }

    .beneficiary-view-grid {
        grid-template-columns: 1fr;
    }

    .beneficiary-view-info-wide {
        grid-column: auto;
    }

    .beneficiary-view-avatar {
        width: 48px;
        height: 48px;

        border-radius: 12px;
    }

}
.beneficiary-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: #fdeaea;
    color: #dc3545;
    transition: background .15s ease;
}

.beneficiary-delete-btn:hover {
    background: #f8d7da;
}

.beneficiary-delete-btn:disabled {
    opacity: .5;
    pointer-events: none;
}

.beneficiary-delete-warning {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    border-radius: 12px;
    background: #fdeaea;
}

.beneficiary-delete-warning-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    height: 40px;
    border-radius: 10px;
    background: #f8d7da;
    color: #dc3545;
}

.beneficiary-delete-note {
    display: block;
    margin-top: .35rem;
    font-size: .875rem;
    color: #6c757d;
}

.beneficiary-view-info-icon .fi {
    width: 20px;
    height: 20px;
    background-size: cover;
}

select.is-invalid option {
    color: initial;
}