/*
====================================================

    FLOWMANAGER

    PROFILE

====================================================
*/


/* ==================================================
   PAGE
================================================== */

.fm-profile-page {

    width:
        100%;

    max-width:
        1100px;

    margin:
        0 auto;

    padding:
        4px 0 18px;

}


/* ==================================================
   HEADER
================================================== */

.fm-profile-header {

    margin-bottom:
        16px;

}


.fm-profile-eyebrow {

    display:
        inline-block;

    margin-bottom:
        4px;

    font-size:
        10px;

    font-weight:
        700;

    letter-spacing:
        .12em;

    color:
        var(--fm-primary);

}


.fm-profile-header h2 {

    margin:
        0;

    font-size:
        27px;

    line-height:
        1.1;

    font-weight:
        700;

    color:
        var(--fm-text-primary);

}


.fm-profile-header p {

    margin:
        5px 0 0;

    font-size:
        14px;

    color:
        var(--fm-text-secondary);

}


/* ==================================================
   PROFILE CARD
================================================== */

.fm-profile-card {

    display:
        grid;

    grid-template-columns:
        220px minmax(0, 1fr);

    overflow:
        hidden;

    background:
        var(--fm-surface);

    border:
        1px solid var(--fm-border);

    border-radius:
        22px;

    box-shadow:
        0 12px 30px rgba(0,
            0,
            0,
            .08);

}


/* ==================================================
   LEFT SIDE
================================================== */

.fm-profile-identity {

    display:
        flex;

    flex-direction:
        column;

    align-items:
        center;

    justify-content:
        flex-start;

    min-width:
        0;

    text-align:
        center;

    padding:
        22px 14px;

    border-right:
        1px solid var(--fm-border);

}


/* ==================================================
   CLIENT AVATAR
================================================== */

.fm-profile-avatar {

    width:
        92px;

    height:
        92px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    overflow:
        hidden;

    flex-shrink:
        0;

    border-radius:
        50%;

    background:
        linear-gradient(135deg,
            var(--fm-primary),
            var(--fm-primary-dark,
                var(--fm-primary)));

    color:
        #ffffff;

    font-size:
        29px;

    font-weight:
        700;

    box-shadow:
        0 8px 22px rgba(0,
            0,
            0,
            .15);

}


.fm-profile-avatar img {

    width:
        100%;

    height:
        100%;

    object-fit:
        cover;

}


/* ==================================================
   NAME
================================================== */

.fm-profile-name {

    margin:
        14px 0 4px;

    font-size:
        19px;

    line-height:
        1.15;

    font-weight:
        700;

    color:
        var(--fm-text-primary);

}


.fm-profile-role {

    margin:
        0;

    font-size:
        13px;

    color:
        var(--fm-text-secondary);

}


/* ==================================================
   STATUS
================================================== */

.fm-profile-status {

    display:
        inline-flex;

    align-items:
        center;

    gap:
        6px;

    margin-top:
        12px;

    padding:
        6px 10px;

    border-radius:
        999px;

    background:
        rgba(99,
            211,
            153,
            .12);

    color:
        #2c9b63;

    font-size:
        11px;

    font-weight:
        700;

}


.fm-profile-status-dot {

    width:
        6px;

    height:
        6px;

    border-radius:
        50%;

    background:
        #58c98c;

}


/* ==================================================
   COACH CARD BUTTON
================================================== */

.fm-profile-coach-card-button {

    width:
        100%;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    margin:
        0;

    padding:
        0;

    border:
        none;

    background:
        transparent;

    appearance:
        none;

    cursor:
        pointer;

}


/* ==================================================
   DIGITAL CARD
================================================== */

.fm-profile-digital-card {

    position:
        relative;

    width:
        100%;

    aspect-ratio:
        430 / 810;

    overflow:
        hidden;

    box-sizing:
        border-box;

    padding:
        25px 27px 22px;

    display:
        flex;

    flex-direction:
        column;

    justify-content:
        space-between;

    border-radius:
        27px;

    background:
        linear-gradient(145deg,
            #a86a6a 0%,
            #7b4d70 45%,
            #39227d 100%);

    color:
        #ffffff;

    box-shadow:
        0 18px 38px rgba(0,
            0,
            0,
            .22);

    isolation:
        isolate;

}


/* ==================================================
   DECORATIONS
================================================== */

.fm-profile-digital-card::before {

    content:
        "";

    position:
        absolute;

    width:
        320px;

    height:
        320px;

    top:
        -205px;

    right:
        -105px;

    border:
        1px solid rgba(255,
            255,
            255,
            .15);

    border-radius:
        50%;

    pointer-events:
        none;

    z-index:
        -1;

}


.fm-profile-digital-card::after {

    content:
        "";

    position:
        absolute;

    width:
        210px;

    height:
        210px;

    left:
        -105px;

    bottom:
        -155px;

    border:
        1px solid rgba(255,
            255,
            255,
            .09);

    border-radius:
        50%;

    pointer-events:
        none;

    z-index:
        -1;

}


.fm-profile-digital-card-decoration {

    position:
        absolute;

    pointer-events:
        none;

    border:
        1px solid rgba(255,
            255,
            255,
            .08);

    border-radius:
        50%;

}


.fm-profile-digital-card .decoration-top {

    width:
        275px;

    height:
        275px;

    top:
        -178px;

    right:
        -115px;

}


.fm-profile-digital-card .decoration-bottom {

    width:
        205px;

    height:
        205px;

    bottom:
        -156px;

    left:
        -104px;

}


/* ==================================================
   CARD TOP
================================================== */

.fm-profile-digital-card-top {

    position:
        relative;

    z-index:
        2;

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        8px;

    min-width:
        0;

}


.fm-profile-digital-card-top strong {

    min-width:
        0;

    overflow:
        hidden;

    text-overflow:
        ellipsis;

    white-space:
        nowrap;

    font-size:
        20px;

    line-height:
        1;

    font-weight:
        750;

    color:
        #ffffff;

}


.fm-profile-digital-card-top span {

    flex-shrink:
        0;

    font-size:
        9px;

    line-height:
        1;

    font-weight:
        700;

    letter-spacing:
        .14em;

    color:
        rgba(255,
            255,
            255,
            .74);

}


/* ==================================================
   CARD CENTER
================================================== */

.fm-profile-digital-card-center {

    position:
        relative;

    z-index:
        2;

    display:
        flex;

    flex-direction:
        column;

    align-items:
        center;

    justify-content:
        center;

    flex:
        1;

    min-height:
        0;

    text-align:
        center;

}


.fm-profile-digital-avatar {

    width:
        72px;

    height:
        72px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    overflow:
        hidden;

    flex-shrink:
        0;

    border:
        2px solid rgba(255,
            255,
            255,
            .48);

    border-radius:
        50%;

    background:
        rgba(255,
            255,
            255,
            .08);

    color:
        #ffffff;

    font-size:
        25px;

    font-weight:
        700;

}


.fm-profile-digital-avatar.has-photo img {

    width:
        100%;

    height:
        100%;

    display:
        block;

    object-fit:
        cover;

}


.fm-profile-digital-avatar:not(.has-photo) span {

    display:
        block;

}


.fm-profile-digital-name {

    max-width:
        100%;

    margin-top:
        11px;

    overflow:
        hidden;

    text-overflow:
        ellipsis;

    white-space:
        nowrap;

    font-size:
        21px;

    line-height:
        1.1;

    font-weight:
        750;

    color:
        #ffffff;

}


.fm-profile-digital-role {

    margin-top:
        4px;

    font-size:
        12px;

    line-height:
        1;

    color:
        rgba(255,
            255,
            255,
            .82);

}


.fm-profile-digital-id {

    max-width:
        100%;

    margin-top:
        8px;

    overflow:
        hidden;

    text-overflow:
        ellipsis;

    white-space:
        nowrap;

    font-size:
        8px;

    line-height:
        1;

    color:
        rgba(255,
            255,
            255,
            .58);

}


/* ==================================================
   QR
================================================== */

.fm-profile-digital-qr {

    position:
        relative;

    z-index:
        2;

    width:
        150px;

    height:
        150px;

    flex-shrink:
        0;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    margin:
        0 auto;

    padding:
        8px;

    box-sizing:
        border-box;

    border-radius:
        13px;

    background:
        #ffffff;

}


.fm-profile-digital-qr img {

    display:
        block;

    width:
        100% !important;

    height:
        100% !important;

    object-fit:
        contain;

}


/* ==================================================
   FOOTER
================================================== */

.fm-profile-digital-card-footer {

    position:
        relative;

    z-index:
        2;

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        8px;

    min-width:
        0;

    color:
        rgba(255,
            255,
            255,
            .82);

    font-size:
        8px;

}


.fm-profile-digital-card-footer>span {

    min-width:
        0;

    overflow:
        hidden;

    text-overflow:
        ellipsis;

    white-space:
        nowrap;

}


.fm-profile-digital-card-footer strong {

    display:
        inline-flex;

    align-items:
        center;

    gap:
        4px;

    flex-shrink:
        0;

    white-space:
        nowrap;

}


.fm-profile-digital-card-footer strong span {

    width:
        6px;

    height:
        6px;

    display:
        block;

    border-radius:
        50%;

    background:
        #58d993;

}


.fm-profile-digital-card-footer strong.inactive span {

    background:
        #d46a6a;

}


/* ==================================================
   SMALL CARD
================================================== */

/*
    La miniatura mantiene la misma composición
    visual que la tarjeta grande.

    Solo se reduce mediante escala proporcional.
    No se deforman alturas internas.
*/

.fm-profile-coach-card-button {

    width:
        178px;

    flex:
        0 0 178px;

}


.fm-profile-coach-card-button .fm-profile-digital-card {

    width:
        178px;

    height:
        335px;

    aspect-ratio:
        auto;

    padding:
        16px 14px 13px;

    border-radius:
        20px;

}


.fm-profile-coach-card-button .fm-profile-digital-card-top strong {

    font-size:
        13px;

}


.fm-profile-coach-card-button .fm-profile-digital-card-top span {

    font-size:
        6px;

}


.fm-profile-coach-card-button .fm-profile-digital-avatar {

    width:
        50px;

    height:
        50px;

    font-size:
        17px;

}


.fm-profile-coach-card-button .fm-profile-digital-name {

    margin-top:
        7px;

    font-size:
        14px;

}


.fm-profile-coach-card-button .fm-profile-digital-role {

    margin-top:
        3px;

    font-size:
        9px;

}


.fm-profile-coach-card-button .fm-profile-digital-id {

    margin-top:
        5px;

    font-size:
        6px;

}


.fm-profile-coach-card-button .fm-profile-digital-qr {

    width:
        104px;

    height:
        104px;

    margin:
        0 auto;

    padding:
        5px;

    border-radius:
        9px;

}


.fm-profile-coach-card-button .fm-profile-digital-qr img {

    width:
        94px !important;

    height:
        94px !important;

}


.fm-profile-coach-card-button .fm-profile-digital-card-footer {

    font-size:
        6px;

}


.fm-profile-coach-card-button .fm-profile-digital-card-footer strong {

    font-size:
        6px;

}


.fm-profile-coach-card-button .fm-profile-digital-card-footer strong span {

    width:
        5px;

    height:
        5px;

}


/* ==================================================
   HOVER
================================================== */

.fm-profile-coach-card-button:hover .fm-profile-digital-card {

    transform:
        translateY(-2px) scale(1.01);

    box-shadow:
        0 20px 38px rgba(0,
            0,
            0,
            .26);

}


/* ==================================================
   HINT
================================================== */

.fm-profile-card-hint {

    margin-top:
        8px;

    font-size:
        9px;

    color:
        var(--fm-text-secondary);

}


/* ==================================================
   COACH ACCESS
================================================== */

.fm-profile-coach-access-card {

    display:
        grid;

    grid-template-columns:
        repeat(3,
            minmax(0,
                1fr));

    gap:
        8px;

    padding:
        12px;

    background:
        var(--fm-background);

    border:
        1px solid var(--fm-border);

    border-radius:
        14px;

}


.fm-profile-coach-access-card>div {

    min-width:
        0;

    padding:
        10px;

    border-radius:
        10px;

    background:
        var(--fm-surface);

}


.fm-profile-coach-access-card span {

    display:
        block;

    margin-bottom:
        4px;

    font-size:
        10px;

    color:
        var(--fm-text-secondary);

}


.fm-profile-coach-access-card strong {

    display:
        block;

    font-size:
        12px;

    line-height:
        1.25;

    color:
        var(--fm-text-primary);

}


/* ==================================================
   RIGHT SIDE
================================================== */

.fm-profile-information {

    min-width:
        0;

    padding:
        24px 28px;

}


/* ==================================================
   SECTION
================================================== */

.fm-profile-section {

    margin-bottom:
        22px;

}


.fm-profile-section:last-child {

    margin-bottom:
        0;

}


.fm-profile-information-title {

    margin:
        0 0 14px;

    font-size:
        16px;

    line-height:
        1.2;

    font-weight:
        700;

    color:
        var(--fm-text-primary);

}


/* ==================================================
   GRID
================================================== */

.fm-profile-grid {

    display:
        grid;

    grid-template-columns:
        repeat(2,
            minmax(0,
                1fr));

    gap:
        12px 20px;

}


/* ==================================================
   FIELD
================================================== */

.fm-profile-field {

    min-width:
        0;

    padding-bottom:
        10px;

    border-bottom:
        1px solid var(--fm-border);

}


.fm-profile-field.full {

    grid-column:
        1 / -1;

}


/* ==================================================
   LABEL
================================================== */

.fm-profile-label {

    display:
        flex;

    align-items:
        center;

    gap:
        6px;

    margin-bottom:
        4px;

    font-size:
        11px;

    font-weight:
        600;

    color:
        var(--fm-text-secondary);

}


.fm-profile-label .material-symbols-outlined {

    font-size:
        16px;

    color:
        var(--fm-primary);

}


/* ==================================================
   VALUE
================================================== */

.fm-profile-value {

    min-height:
        18px;

    font-size:
        14px;

    line-height:
        1.3;

    font-weight:
        500;

    color:
        var(--fm-text-primary);

    overflow-wrap:
        anywhere;

}


/* ==================================================
   MEMBERSHIP
================================================== */

.fm-profile-membership-card {

    padding:
        14px;

    border:
        1px solid var(--fm-border);

    border-radius:
        14px;

    background:
        var(--fm-background);

}


.fm-profile-membership-header {

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        12px;

    margin-bottom:
        12px;

}


.fm-profile-membership-name {

    font-size:
        15px;

    font-weight:
        700;

    color:
        var(--fm-text-primary);

}


.fm-profile-membership-status {

    flex-shrink:
        0;

    padding:
        5px 9px;

    border-radius:
        999px;

    font-size:
        10px;

    font-weight:
        700;

}


.fm-profile-membership-status.active {

    background:
        rgba(99,
            211,
            153,
            .13);

    color:
        #2c9b63;

}


.fm-profile-membership-status.inactive {

    background:
        rgba(180,
            90,
            90,
            .12);

    color:
        #a64e4e;

}


/* ==================================================
   MEMBERSHIP GRID
================================================== */

.fm-profile-membership-grid {

    display:
        grid;

    grid-template-columns:
        repeat(3,
            minmax(0,
                1fr));

    gap:
        8px;

}


.fm-profile-membership-stat {

    padding:
        9px;

    border-radius:
        10px;

    background:
        var(--fm-surface);

}


.fm-profile-membership-stat-label {

    display:
        block;

    margin-bottom:
        3px;

    font-size:
        10px;

    color:
        var(--fm-text-secondary);

}


.fm-profile-membership-stat-value {

    display:
        block;

    font-size:
        12px;

    line-height:
        1.2;

    font-weight:
        700;

    color:
        var(--fm-text-primary);

}


/* ==================================================
   LOADING
================================================== */

.fm-profile-loading,
.fm-profile-empty {

    padding:
        30px;

    text-align:
        center;

    color:
        var(--fm-text-secondary);

}


/* ==================================================
   MODAL
================================================== */

.fm-profile-card-modal {

    position:
        fixed;

    inset:
        0;

    z-index:
        9999;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    padding:
        18px;

    box-sizing:
        border-box;

}


/* ==================================================
   BACKDROP
================================================== */

.fm-profile-card-modal-backdrop {

    position:
        absolute;

    inset:
        0;

    background:
        rgba(10,
            12,
            20,
            .60);

    backdrop-filter:
        blur(8px);

}


/* ==================================================
   MODAL DIALOG
================================================== */

.fm-profile-card-modal-dialog {

    position:
        relative;

    z-index:
        1;

    width:
        min(390px,
            88vw);

    display:
        flex;

    flex-direction:
        column;

    align-items:
        center;

}


/* ==================================================
   CLOSE
================================================== */

.fm-profile-card-modal-close {

    position:
        absolute;

    top:
        -13px;

    right:
        -13px;

    width:
        38px;

    height:
        38px;

    z-index:
        20;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border:
        1px solid rgba(255,
            255,
            255,
            .20);

    border-radius:
        50%;

    background:
        #20222d;

    color:
        #ffffff;

    cursor:
        pointer;

    box-shadow:
        0 8px 20px rgba(0,
            0,
            0,
            .30);

    transition:
        transform .18s ease;

}


.fm-profile-card-modal-close:hover {

    transform:
        scale(1.06);

}


.fm-profile-card-modal-close .material-symbols-outlined {

    font-size:
        21px;

}


/* ==================================================
   MODAL CARD
================================================== */

.fm-profile-card-modal-dialog .fm-profile-digital-card {

    width:
        100%;

    aspect-ratio:
        430 / 810;

    padding:
        28px 27px 24px;

    border-radius:
        24px;

    box-shadow:
        0 30px 80px rgba(0,
            0,
            0,
            .44);

}


/* ==================================================
   MODAL TOP
================================================== */

.fm-profile-card-modal-dialog .fm-profile-digital-card-top strong {

    font-size:
        21px;

}


.fm-profile-card-modal-dialog .fm-profile-digital-card-top span {

    font-size:
        9px;

}


/* ==================================================
   MODAL AVATAR
================================================== */

.fm-profile-card-modal-dialog .fm-profile-digital-avatar {

    width:
        86px;

    height:
        86px;

    font-size:
        30px;

}


/* ==================================================
   MODAL NAME
================================================== */

.fm-profile-card-modal-dialog .fm-profile-digital-name {

    margin-top:
        14px;

    font-size:
        25px;

}


/* ==================================================
   MODAL ROLE
================================================== */

.fm-profile-card-modal-dialog .fm-profile-digital-role {

    margin-top:
        5px;

    font-size:
        14px;

}


/* ==================================================
   MODAL ID
================================================== */

.fm-profile-card-modal-dialog .fm-profile-digital-id {

    margin-top:
        8px;

    font-size:
        10px;

}


/* ==================================================
   MODAL QR
================================================== */

.fm-profile-card-modal-dialog .fm-profile-digital-qr {

    width:
        170px;

    height:
        170px;

    padding:
        9px;

    border-radius:
        13px;

}


.fm-profile-card-modal-dialog .fm-profile-digital-qr img {

    width:
        152px !important;

    height:
        152px !important;

}


/* ==================================================
   MODAL FOOTER
================================================== */

.fm-profile-card-modal-dialog .fm-profile-digital-card-footer {

    font-size:
        9px;

}


.fm-profile-card-modal-dialog .fm-profile-digital-card-footer strong {

    font-size:
        9px;

}


/* ==================================================
   CAPTION
================================================== */

.fm-profile-card-modal-caption {

    margin-top:
        9px;

    color:
        rgba(255,
            255,
            255,
            .78);

    font-size:
        11px;

    text-align:
        center;

}


/* ==================================================
   SCROLL
================================================== */

body.fm-profile-modal-open {

    overflow:
        hidden;

}


/* ==================================================
   TABLET
================================================== */

@media (max-width: 900px) {

    .fm-profile-card {

        grid-template-columns:
            190px minmax(0,
                1fr);

    }


    .fm-profile-information {

        padding:
            20px;

    }


    .fm-profile-coach-card-button {

        width:
            166px;

        flex-basis:
            166px;

    }


    .fm-profile-coach-card-button .fm-profile-digital-card {

        width:
            166px;

        height:
            313px;

    }

}


/* ==================================================
   MOBILE
================================================== */

@media (max-width: 760px) {

    .fm-profile-page {

        padding:
            2px 0 18px;

    }


    .fm-profile-header h2 {

        font-size:
            24px;

    }


    .fm-profile-header p {

        font-size:
            13px;

    }


    .fm-profile-card {

        grid-template-columns:
            1fr;

    }


    .fm-profile-identity {

        padding:
            22px 16px;

        border-right:
            none;

        border-bottom:
            1px solid var(--fm-border);

    }


    .fm-profile-information {

        padding:
            20px 18px;

    }


    .fm-profile-grid {

        grid-template-columns:
            1fr;

        gap:
            12px;

    }


    .fm-profile-field.full {

        grid-column:
            auto;

    }


    .fm-profile-membership-grid {

        grid-template-columns:
            1fr;

    }


    .fm-profile-coach-access-card {

        grid-template-columns:
            1fr;

    }


    .fm-profile-coach-card-button {

        width:
            166px;

        flex-basis:
            166px;

    }


    .fm-profile-coach-card-button .fm-profile-digital-card {

        width:
            166px;

        height:
            313px;

        padding:
            15px 13px 12px;

        border-radius:
            20px;

    }


    .fm-profile-card-modal {

        padding:
            16px;

    }


    .fm-profile-card-modal-dialog {

        width:
            min(350px,
                88vw);

    }


    .fm-profile-card-modal-dialog .fm-profile-digital-card {

        padding:
            23px 20px 20px;

        border-radius:
            21px;

    }


    .fm-profile-card-modal-dialog .fm-profile-digital-avatar {

        width:
            76px;

        height:
            76px;

        font-size:
            26px;

    }


    .fm-profile-card-modal-dialog .fm-profile-digital-name {

        font-size:
            21px;

    }


    .fm-profile-card-modal-dialog .fm-profile-digital-qr {

        width:
            145px;

        height:
            145px;

        padding:
            8px;

    }


    .fm-profile-card-modal-dialog .fm-profile-digital-qr img {

        width:
            129px !important;

        height:
            129px !important;

    }


    .fm-profile-card-modal-close {

        top:
            -9px;

        right:
            -9px;

        width:
            34px;

        height:
            34px;

    }

}