/* =========================================
   ACCOUNT VARIABLES
========================================= */

:root {
    --account-sidebar-width: 280px;
    --account-mobile-bar-height: 64px;
}


/* =========================================
   ACCOUNT WRAPPER
========================================= */

.account-wrapper {
    display: flex;

    width: 100%;

    min-height: calc(100vh - 72px);
}


/* =========================================
   ACCOUNT SIDEBAR
========================================= */

.account-sidebar {
    width: var(--account-sidebar-width);

    min-width: var(--account-sidebar-width);

    min-height: calc(100vh - 72px);

    padding: 24px 18px;

    background: #ffffff;

    border-right: 1px solid #e9ecef;

    display: flex;

    flex-direction: column;

    transition: transform 0.3s ease;

    z-index: 1050;
}


/* =========================================
   SIDEBAR HEADER
========================================= */

.account-sidebar-header {
    display: none;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 18px;
}


.account-sidebar-title {
    color: #212529;

    font-size: 17px;

    font-weight: 700;
}


.account-sidebar-close {
    display: none;

    width: 38px;

    height: 38px;

    border: 0;

    border-radius: 9px;

    background: #f1f3f5;

    color: #495057;

    font-size: 18px;

    align-items: center;

    justify-content: center;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}


.account-sidebar-close:hover {
    background: #e9ecef;

    transform: rotate(90deg);
}


/* =========================================
   PROFILE
========================================= */

.account-profile {
    display: flex;

    align-items: center;

    gap: 12px;

    padding:
        4px
        6px
        22px;

    margin-bottom: 16px;

    border-bottom:
        1px solid #e9ecef;
}


.account-profile-avatar {
    width: 50px;

    height: 50px;

    min-width: 50px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 50%;

    background:
        rgba(25, 135, 84, 0.12);

    color: #198754;

    font-size: 20px;

    font-weight: 700;
}


.account-profile-info {
    min-width: 0;
}


.account-profile-info h5 {
    margin: 0 0 3px;

    color: #212529;

    font-size: 15px;

    font-weight: 600;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}


.account-profile-info span {
    display: block;

    max-width: 175px;

    color: #6c757d;

    font-size: 11px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}


/* =========================================
   NAVIGATION
========================================= */

.account-navigation {
    flex: 1;
}


.account-navigation ul {
    list-style: none;

    padding: 0;

    margin: 0;
}


.account-navigation li {
    margin-bottom: 4px;
}


.account-navigation a {
    position: relative;

    min-height: 48px;

    padding:
        10px
        13px;

    display: flex;

    align-items: center;

    gap: 12px;

    border-radius: 10px;

    color: #495057;

    font-size: 14px;

    font-weight: 500;

    text-decoration: none;

    transition:
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}


.account-navigation a:hover {
    color: #198754;

    background:
        rgba(25, 135, 84, 0.07);

    transform: translateX(2px);
}


/* =========================================
   MENU ICON
========================================= */

.account-menu-icon {
    width: 24px;

    min-width: 24px;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 16px;
}


/* =========================================
   ACTIVE MENU
========================================= */

.account-navigation a.active {
    color: #198754;

    background:
        rgba(25, 135, 84, 0.1);

    font-weight: 600;
}


.account-navigation a.active::before {
    content: "";

    position: absolute;

    left: 0;

    top: 12px;

    bottom: 12px;

    width: 3px;

    border-radius:
        0
        10px
        10px
        0;

    background: #198754;
}


/* =========================================
   DIVIDER
========================================= */

.account-menu-divider {
    margin:
        24px
        13px
        8px !important;
}


.account-menu-divider span {
    color: #adb5bd;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 1.4px;
}


/* =========================================
   LOGOUT
========================================= */

.account-navigation
.account-logout-link {
    color: #dc3545;
}


.account-navigation
.account-logout-link:hover {
    color: #dc3545;

    background:
        rgba(220, 53, 69, 0.08);
}


/* =========================================
   ACCOUNT CONTENT
========================================= */

.account-content {
    flex: 1;

    min-width: 0;

    padding: 30px;

    background: #f8f9fa;
}


/* =========================================
   MOBILE ACCOUNT BAR
========================================= */

.account-mobile-bar {
    display: none;

    height: var(--account-mobile-bar-height);

    padding:
        0
        16px;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

    background: #ffffff;

    border-bottom:
        1px solid #e9ecef;

    position: sticky;

    top: 0;

    z-index: 1020;
}


.account-mobile-menu-btn {
    width: 42px;

    height: 42px;

    border: 0;

    border-radius: 10px;

    display: flex;

    align-items: center;

    justify-content: center;

    background:
        rgba(25, 135, 84, 0.1);

    color: #198754;

    font-size: 18px;

    cursor: pointer;
}


.account-mobile-title {
    flex: 1;

    min-width: 0;

    display: flex;

    align-items: center;

    gap: 8px;

    color: #212529;

    font-size: 16px;

    font-weight: 700;
}


.account-mobile-title-icon {
    color: #198754;
}


.account-mobile-avatar {
    width: 38px;

    height: 38px;

    min-width: 38px;

    border-radius: 50%;

    display: flex;

    align-items: center;

    justify-content: center;

    background:
        rgba(25, 135, 84, 0.12);

    color: #198754;

    font-size: 14px;

    font-weight: 700;
}


/* =========================================
   OVERLAY
========================================= */

.account-sidebar-overlay {
    position: fixed;

    inset: 0;

    background:
        rgba(15, 23, 42, 0.58);

    backdrop-filter: blur(2px);

    -webkit-backdrop-filter: blur(2px);

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    z-index: 1040;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}


.account-sidebar-overlay.active {
    opacity: 1;

    visibility: visible;

    pointer-events: auto;
}


/* =========================================
   TABLET / MOBILE
========================================= */

@media screen and (max-width: 991.98px) {

    .account-mobile-bar {
        display: flex;
    }


    .account-wrapper {
        display: block;

        min-height:
            calc(
                100vh -
                var(--account-mobile-bar-height)
            );
    }


    .account-sidebar {
        position: fixed;

        top: 0;

        left: 0;

        width: 290px;

        min-width: 290px;

        max-width: 86vw;

        height: 100vh;

        height: 100dvh;

        min-height: 100vh;

        padding:
            18px
            16px;

        overflow-y: auto;

        transform:
            translateX(-105%);

        box-shadow:
            8px
            0
            30px
            rgba(0, 0, 0, 0.15);

        z-index: 1050;
    }


    .account-sidebar.account-sidebar-open {
        transform:
            translateX(0);
    }


    .account-sidebar-header {
        display: flex;
    }


    .account-sidebar-close {
        display: flex;
    }


    .account-content {
        width: 100%;

        padding: 24px 20px;
    }


    body.account-sidebar-active {
        overflow: hidden;
    }

}


/* =========================================
   SMALL MOBILE
========================================= */

@media screen and (max-width: 575.98px) {

    .account-mobile-bar {
        height: 60px;

        padding:
            0
            12px;
    }


    .account-mobile-menu-btn {
        width: 40px;

        height: 40px;

        font-size: 17px;
    }


    .account-mobile-title {
        font-size: 15px;
    }


    .account-mobile-avatar {
        width: 36px;

        height: 36px;

        min-width: 36px;
    }


    .account-sidebar {
        width: 86vw;

        max-width: 300px;

        padding:
            16px
            14px;
    }


    .account-profile {
        padding-bottom: 18px;
    }


    .account-profile-avatar {
        width: 46px;

        height: 46px;

        min-width: 46px;

        font-size: 18px;
    }


    .account-navigation a {
        min-height: 50px;

        padding:
            11px
            13px;

        font-size: 15px;
    }


    .account-content {
        padding:
            20px
            14px;
    }

}