/* =====================================================
   LIFEMATE CLOUD
   Auth / Account / Profile / Avatar
===================================================== */

body.cloud-modal-open {
    overflow: hidden;
}


/* =====================================================
   SIDEBAR PROFILE
===================================================== */

#profileButton,
.profile {
    cursor: pointer;
    transition:
        background .18s ease,
        border-color .18s ease,
        transform .18s ease;
}

#profileButton:hover,
.profile:hover {
    background: rgba(255,255,255,.045);
}

.cloud-sidebar-avatar-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: inherit;
}

.cloud-profile-dot {
    width: 6px;
    height: 6px;
    margin-right: 5px;
    display: inline-block;
    vertical-align: 1px;
    border-radius: 50%;
    background: #3dd8a0;
    box-shadow: 0 0 9px rgba(61,216,160,.48);
}

.cloud-profile-dot.syncing {
    background: #9787ff;
    box-shadow: 0 0 9px rgba(151,135,255,.42);
}

.cloud-profile-dot.error {
    background: #ff7189;
    box-shadow: 0 0 9px rgba(255,113,137,.4);
}


/* =====================================================
   OVERLAY
===================================================== */

.cloud-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;

    padding: 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(1,2,8,.72);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity .22s ease,
        visibility .22s ease;
}

.cloud-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}


/* =====================================================
   MODAL
===================================================== */

.cloud-modal {
    width: min(455px, 100%);
    max-height: calc(100vh - 48px);

    position: relative;

    overflow-y: auto;

    padding: 36px 34px 31px;

    border: 1px solid rgba(255,255,255,.09);
    border-radius: 27px;

    background:
        radial-gradient(
            circle at 50% -10%,
            rgba(105,72,255,.20),
            transparent 39%
        ),
        radial-gradient(
            circle at 100% 100%,
            rgba(67,91,255,.07),
            transparent 35%
        ),
        linear-gradient(
            150deg,
            rgba(20,22,39,.99),
            rgba(8,10,20,.995)
        );

    box-shadow:
        0 45px 140px rgba(0,0,0,.76),
        0 0 90px rgba(93,64,255,.09);

    transform:
        translateY(16px)
        scale(.98);

    transition:
        transform .22s ease;
}

.cloud-overlay.show
.cloud-modal {
    transform:
        translateY(0)
        scale(1);
}

.cloud-modal::-webkit-scrollbar {
    width: 5px;
}

.cloud-modal::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.09);
    border-radius: 999px;
}


/* =====================================================
   CLOSE
===================================================== */

.cloud-close-btn {
    width: 38px;
    height: 38px;

    position: absolute;

    top: 15px;
    right: 15px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255,255,255,.065);
    border-radius: 11px;

    background: rgba(255,255,255,.025);

    color: #70768d;

    cursor: pointer;

    transition: .18s ease;
}

.cloud-close-btn:hover {
    background: rgba(255,255,255,.065);
    color: #f5f6ff;
}

.cloud-close-btn svg {
    width: 16px;
    height: 16px;
}


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

.cloud-logo {
    width: 62px;
    height: 62px;

    margin: 2px auto 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255,255,255,.08);
    border-radius: 20px;

    background:
        linear-gradient(
            135deg,
            #4d7cff,
            #7157ff 52%,
            #b54ddf
        );

    color: white;

    font-size: 25px;

    box-shadow:
        0 15px 36px rgba(86,71,255,.20),
        0 0 45px rgba(109,72,255,.15);
}


/* =====================================================
   HEADINGS
===================================================== */

.cloud-eyebrow {
    margin-bottom: 7px;

    color: #8879ef;

    font-size: 8px;
    font-weight: 800;

    letter-spacing: 1.8px;

    text-align: center;
}

.cloud-auth-view h2,
.cloud-account-view h2,
.cloud-edit-view h2 {
    margin: 0;

    color: #f5f5fb;

    font-size: 25px;
    font-weight: 740;

    letter-spacing: -.7px;

    text-align: center;
}

.cloud-subtitle,
.cloud-edit-heading p {
    max-width: 350px;

    margin: 8px auto 26px;

    color: #777d94;

    font-size: 11px;
    line-height: 1.6;

    text-align: center;
}


/* =====================================================
   FIELDS
===================================================== */

.cloud-field {
    margin-top: 15px;
}

.cloud-name-field {
    display: none;
}

.cloud-field label {
    display: block;

    margin: 0 0 7px 2px;

    color: #a8acbd;

    font-size: 10px;
    font-weight: 620;
}

.cloud-input {
    height: 50px;

    padding: 0 13px;

    display: flex;
    align-items: center;

    gap: 9px;

    border: 1px solid rgba(255,255,255,.075);
    border-radius: 14px;

    background: rgba(255,255,255,.027);

    transition:
        border-color .18s ease,
        background .18s ease,
        box-shadow .18s ease;
}

.cloud-input:focus-within {
    border-color: rgba(122,91,255,.53);

    background: rgba(255,255,255,.035);

    box-shadow:
        0 0 0 3px rgba(116,83,255,.065);
}

.cloud-input-readonly {
    opacity: .72;
}

.cloud-input > svg {
    width: 16px;
    height: 16px;

    flex: 0 0 16px;

    color: #686e85;
}

.cloud-input input {
    min-width: 0;

    height: 100%;

    flex: 1;

    border: none;
    outline: none;

    background: transparent;

    color: #f6f6fb;

    font-family: inherit;
    font-size: 12px;
}

.cloud-input input::placeholder {
    color: #545a70;
}

.cloud-input input[readonly] {
    cursor: default;
}


/* =====================================================
   PASSWORD
===================================================== */

.cloud-password-toggle {
    width: 29px;
    height: 29px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 8px;

    background: transparent;

    color: #656b81;

    cursor: pointer;
}

.cloud-password-toggle:hover {
    background: rgba(255,255,255,.04);
    color: #b7bbce;
}

.cloud-password-toggle svg {
    width: 15px;
    height: 15px;
}


/* =====================================================
   FORGOT PASSWORD
===================================================== */

.cloud-forgot-row {
    margin-top: 9px;

    display: flex;

    justify-content: flex-end;
}

.cloud-forgot-row button,
.cloud-auth-switch button {
    padding: 0;

    border: none;

    background: transparent;

    color: #a596ff;

    font-family: inherit;
    font-size: 10px;
    font-weight: 680;

    cursor: pointer;
}

.cloud-forgot-row button:hover,
.cloud-auth-switch button:hover {
    color: #c3b9ff;
}


/* =====================================================
   ERRORS
===================================================== */

.cloud-auth-error {
    display: none;

    margin-top: 13px;

    padding: 10px 12px;

    border: 1px solid rgba(255,99,126,.15);
    border-radius: 11px;

    background: rgba(255,88,116,.055);

    color: #ec8195;

    font-size: 10px;
    line-height: 1.5;
}

.cloud-auth-error.show {
    display: block;
}


/* =====================================================
   PRIMARY BUTTON
===================================================== */

.cloud-primary-btn {
    width: 100%;
    height: 50px;

    margin-top: 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    border: none;
    border-radius: 14px;

    background:
        linear-gradient(
            100deg,
            #517eff,
            #7855ff,
            #a84fe1
        );

    color: white;

    font-family: inherit;
    font-size: 11px;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 13px 31px rgba(94,68,255,.19);

    transition:
        transform .18s ease,
        filter .18s ease,
        opacity .18s ease;
}

.cloud-primary-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.06);
}

.cloud-primary-btn:active:not(:disabled) {
    transform: translateY(0);
}

.cloud-primary-btn:disabled {
    opacity: .52;
    cursor: default;
}

.cloud-primary-btn svg {
    width: 15px;
    height: 15px;
}


/* =====================================================
   SWITCH
===================================================== */

.cloud-auth-switch {
    margin-top: 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 5px;

    color: #6f748a;

    font-size: 10px;
}


/* =====================================================
   SECURITY
===================================================== */

.cloud-security-note {
    margin-top: 25px;

    padding: 12px 13px;

    display: flex;

    align-items: flex-start;

    gap: 8px;

    border: 1px solid rgba(255,255,255,.052);
    border-radius: 12px;

    background: rgba(255,255,255,.017);

    color: #646a80;

    font-size: 8px;
    line-height: 1.5;
}

.cloud-security-note svg {
    width: 14px;
    height: 14px;

    flex: 0 0 14px;

    color: #7587de;
}


/* =====================================================
   ACCOUNT
===================================================== */

.cloud-account-view {
    display: none;

    padding-top: 3px;
}

.cloud-account-avatar,
.cloud-edit-avatar {
    width: 78px;
    height: 78px;

    margin: 0 auto 18px;

    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    border: 1px solid rgba(255,255,255,.09);
    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #537fff,
            #7b5aff 52%,
            #b64edc
        );

    color: white;

    font-size: 22px;
    font-weight: 750;

    box-shadow:
        0 15px 36px rgba(89,68,255,.16),
        0 0 40px rgba(108,78,255,.13);
}

.cloud-account-avatar img,
.cloud-edit-avatar img {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    display: none;

    object-fit: cover;
}

.cloud-account-avatar > span,
.cloud-edit-avatar > span {
    position: relative;

    z-index: 1;
}

.cloud-online-dot {
    width: 16px;
    height: 16px;

    position: absolute;

    right: 1px;
    bottom: 4px;

    z-index: 3;

    border: 3px solid #101222;
    border-radius: 50%;

    background: #42d6a2;
}

.cloud-account-email {
    margin: 6px 0 12px;

    color: #777d93;

    font-size: 10px;

    text-align: center;
}


/* =====================================================
   EDIT PROFILE BUTTON
===================================================== */

.cloud-edit-profile-btn {
    min-width: 112px;
    height: 34px;

    margin: 0 auto 17px;

    padding: 0 13px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    border: 1px solid rgba(125,98,255,.14);
    border-radius: 10px;

    background: rgba(111,84,255,.045);

    color: #aaa0ed;

    font-family: inherit;
    font-size: 9px;
    font-weight: 650;

    cursor: pointer;

    transition: .18s ease;
}

.cloud-edit-profile-btn:hover {
    background: rgba(111,84,255,.09);
    color: #cec6ff;
}

.cloud-edit-profile-btn svg {
    width: 13px;
    height: 13px;
}


/* =====================================================
   SYNC
===================================================== */

.cloud-sync-card {
    min-height: 65px;

    padding: 0 15px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border: 1px solid rgba(60,213,160,.10);
    border-radius: 15px;

    background:
        linear-gradient(
            110deg,
            rgba(40,199,148,.055),
            rgba(81,94,255,.035)
        );
}

.cloud-sync-main {
    display: flex;
    align-items: center;

    gap: 11px;
}

.cloud-sync-icon {
    width: 37px;
    height: 37px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: rgba(53,201,154,.08);

    color: #58cfaa;
}

.cloud-sync-icon svg {
    width: 17px;
    height: 17px;
}

.cloud-sync-main strong {
    display: block;

    color: #e8e9f1;

    font-size: 11px;
}

.cloud-sync-main span {
    display: block;

    margin-top: 3px;

    color: #6f768b;

    font-size: 8px;
}

.cloud-sync-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: #42d6a2;

    box-shadow:
        0 0 10px rgba(66,214,162,.42);
}


/* =====================================================
   STATS
===================================================== */

.cloud-stats {
    margin-top: 12px;

    display: grid;

    grid-template-columns:
        repeat(
            3,
            1fr
        );

    gap: 8px;
}

.cloud-stat {
    min-height: 95px;

    padding: 14px 9px 12px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255,255,255,.055);
    border-radius: 14px;

    background: rgba(255,255,255,.018);
}

.cloud-stat-icon {
    width: 30px;
    height: 30px;

    margin-bottom: 7px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;

    background: rgba(111,86,255,.08);

    color: #927ff0;
}

.cloud-stat-icon svg {
    width: 14px;
    height: 14px;
}

.cloud-stat strong {
    color: #efeff7;

    font-size: 16px;
    font-weight: 720;
}

.cloud-stat span {
    margin-top: 3px;

    color: #696f84;

    font-size: 8px;
}


/* =====================================================
   ACCOUNT LIST
===================================================== */

.cloud-account-list {
    margin-top: 13px;

    padding: 2px 14px;

    border: 1px solid rgba(255,255,255,.057);
    border-radius: 16px;

    background: rgba(255,255,255,.017);
}

.cloud-account-row {
    min-height: 68px;

    display: flex;
    align-items: center;

    gap: 11px;

    border-bottom: 1px solid rgba(255,255,255,.043);
}

.cloud-account-row:last-child {
    border-bottom: none;
}

.cloud-account-row-icon {
    width: 35px;
    height: 35px;

    flex: 0 0 35px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: rgba(111,84,255,.075);

    color: #9081eb;
}

.cloud-account-row-icon svg {
    width: 15px;
    height: 15px;
}

.cloud-account-row > div:nth-child(2) {
    min-width: 0;
    flex: 1;
}

.cloud-account-row strong {
    display: block;

    color: #d9dae5;

    font-size: 10px;
}

.cloud-account-row span {
    display: block;

    margin-top: 3px;

    color: #686e82;

    font-size: 8px;
    line-height: 1.45;
}

.cloud-row-check {
    width: 14px;
    height: 14px;

    flex: 0 0 14px;

    color: #4fcda4;
}


/* =====================================================
   SECONDARY / LOGOUT
===================================================== */

.cloud-secondary-btn,
.cloud-logout-btn {
    width: 100%;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    border-radius: 12px;

    font-family: inherit;
    font-size: 10px;
    font-weight: 650;

    cursor: pointer;

    transition: .18s ease;
}

.cloud-secondary-btn {
    margin-top: 15px;

    border: 1px solid rgba(116,91,255,.14);

    background: rgba(111,84,255,.045);

    color: #a395ef;
}

.cloud-secondary-btn:hover:not(:disabled) {
    background: rgba(111,84,255,.085);
    color: #c6bcff;
}

.cloud-logout-btn {
    margin-top: 9px;

    border: 1px solid rgba(255,93,119,.12);

    background: rgba(255,83,112,.035);

    color: #d9788a;
}

.cloud-logout-btn:hover:not(:disabled) {
    border-color: rgba(255,93,119,.20);

    background: rgba(255,83,112,.07);

    color: #f28b9e;
}

.cloud-secondary-btn:disabled,
.cloud-logout-btn:disabled {
    opacity: .45;

    cursor: default;
}

.cloud-secondary-btn svg,
.cloud-logout-btn svg {
    width: 14px;
    height: 14px;
}


/* =====================================================
   EDIT PROFILE
===================================================== */

.cloud-edit-view {
    display: none;

    padding-top: 3px;
}

.cloud-edit-heading {
    margin-bottom: 20px;
}

.cloud-edit-heading p {
    margin-bottom: 18px;
}

.cloud-edit-avatar {
    width: 92px;
    height: 92px;

    margin-bottom: 13px;

    font-size: 27px;
}


/* =====================================================
   AVATAR ACTIONS
===================================================== */

.cloud-avatar-actions {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;
}

.cloud-avatar-change-btn,
.cloud-avatar-remove-btn {
    min-height: 36px;

    padding: 0 12px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    border-radius: 10px;

    font-family: inherit;
    font-size: 9px;
    font-weight: 650;

    cursor: pointer;

    transition: .18s ease;
}

.cloud-avatar-change-btn {
    border: 1px solid rgba(116,91,255,.15);

    background: rgba(111,84,255,.06);

    color: #b0a5f4;
}

.cloud-avatar-remove-btn {
    border: 1px solid rgba(255,93,119,.11);

    background: rgba(255,83,112,.035);

    color: #cf7888;
}

.cloud-avatar-change-btn:hover:not(:disabled) {
    background: rgba(111,84,255,.11);

    color: #d1c9ff;
}

.cloud-avatar-remove-btn:hover:not(:disabled) {
    background: rgba(255,83,112,.07);

    color: #ef91a1;
}

.cloud-avatar-change-btn:disabled,
.cloud-avatar-remove-btn:disabled {
    opacity: .4;

    cursor: default;
}

.cloud-avatar-change-btn svg,
.cloud-avatar-remove-btn svg {
    width: 13px;
    height: 13px;
}

.cloud-avatar-hint {
    margin-top: 8px;

    color: #5f657a;

    font-size: 8px;

    text-align: center;
}


/* =====================================================
   EDIT ACTIONS
===================================================== */

.cloud-edit-actions {
    margin-top: 19px;

    display: grid;

    grid-template-columns:
        1fr 1.45fr;

    gap: 9px;
}

.cloud-edit-actions
.cloud-secondary-btn,
.cloud-edit-actions
.cloud-primary-btn {
    margin-top: 0;
}

.cloud-edit-save,
.cloud-edit-cancel {
    height: 44px;
}


/* =====================================================
   TABLET
===================================================== */

@media (
    max-width: 700px
) {
    .cloud-overlay {
        padding: 15px;
    }

    .cloud-modal {
        max-height:
            calc(
                100vh - 30px
            );
    }
}


/* =====================================================
   MOBILE
===================================================== */

@media (
    max-width: 520px
) {
    .cloud-overlay {
        padding: 9px;

        align-items: flex-end;
    }

    .cloud-modal {
        width: 100%;

        max-height: 94vh;

        padding: 31px 19px 22px;

        border-radius:
            23px 23px 16px 16px;
    }

    .cloud-logo {
        width: 55px;
        height: 55px;

        border-radius: 17px;

        font-size: 22px;
    }

    .cloud-auth-view h2,
    .cloud-account-view h2,
    .cloud-edit-view h2 {
        font-size: 22px;
    }

    .cloud-subtitle {
        margin-bottom: 22px;
    }

    .cloud-input {
        height: 48px;
    }

    .cloud-stats {
        gap: 6px;
    }

    .cloud-stat {
        min-height: 87px;
    }

    .cloud-edit-actions {
        grid-template-columns: 1fr;
    }
}