/*=========================================================
    APPLICATION SHELL
=========================================================*/

html,
body {

    margin: 0;

    padding: 0;

    min-height: 100%;

}


body {

    background: #f5f7fa;

}


.app-shell {

    min-height: 100vh;

    display: flex;

    flex-direction: column;

}


/*=========================================================
    HEADER
=========================================================*/

.app-header {

    height: 64px;

    background: #ffffff;

    border-bottom: 1px solid #e5e7eb;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 22px;

    position: sticky;

    top: 0;

    z-index: 1000;

}


.header-brand {

    display: flex;

    align-items: center;

    gap: 14px;

}


.brand-link {

    text-decoration: none;

    display: flex;

    flex-direction: column;

}


.brand-title {

    font-size: 20px;

    font-weight: 700;

    line-height: 1.1;

    color: #212529;

}


.brand-subtitle {

    font-size: 11px;

    color: #6c757d;

}


.sidebar-toggle {

    border: none;

    background: transparent;

    font-size: 23px;

    cursor: pointer;

    padding: 5px;

}


.header-user {

    display: flex;

    align-items: center;

    gap: 12px;

}


.user-details {

    text-align: right;

}


.user-name {

    font-weight: 600;

    font-size: 14px;

}


.user-role {

    font-size: 12px;

    color: #6c757d;

}


.user-avatar {

    width: 38px;

    height: 38px;

    border-radius: 50%;

    background: #198754;

    color: #ffffff;

    display: flex;

    align-items: center;

    justify-content: center;

    font-weight: 700;

}


.logout-form {

    margin: 0;

}


/*=========================================================
    BODY
=========================================================*/

.app-body {

    flex: 1;

    display: flex;

    min-height: calc(
        100vh - 64px
    );

}


/*=========================================================
    SIDEBAR
=========================================================*/

.app-sidebar {

    width: 245px;

    background: #ffffff;

    border-right: 1px solid #e5e7eb;

    display: flex;

    flex-direction: column;

    flex-shrink: 0;

    transition:
        width 0.2s ease,
        transform 0.2s ease;

}


.sidebar-header {

    padding: 18px 20px 12px;

    font-size: 12px;

    font-weight: 700;

    text-transform: uppercase;

    color: #6c757d;

    letter-spacing: 0.05em;

}


.sidebar-nav {

    flex: 1;

    padding: 5px 12px;

}


.sidebar-link {

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 11px 13px;

    margin-bottom: 4px;

    border-radius: 7px;

    text-decoration: none;

    color: #495057;

    font-size: 14px;

    transition:
        background 0.15s ease,
        color 0.15s ease;

}


.sidebar-link:hover {

    background: #f1f3f5;

    color: #198754;

}


.sidebar-link.active {

    background: #e8f5ee;

    color: #198754;

    font-weight: 600;

}


.sidebar-icon {

    width: 20px;

    text-align: center;

    font-size: 16px;

}


.sidebar-section-title {

    padding: 20px 13px 7px;

    font-size: 11px;

    font-weight: 700;

    text-transform: uppercase;

    color: #adb5bd;

    letter-spacing: 0.06em;

}


.sidebar-footer {

    padding: 14px 20px;

    border-top: 1px solid #e5e7eb;

}


.sidebar-version {

    font-size: 12px;

    color: #6c757d;

    display: flex;

    justify-content: space-between;

}


/*=========================================================
    MAIN CONTENT
=========================================================*/

.main-content {

    flex: 1;

    min-width: 0;

    padding: 24px;

}


/*=========================================================
    FOOTER
=========================================================*/

.app-footer {

    min-height: 46px;

    background: #ffffff;

    border-top: 1px solid #e5e7eb;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 24px;

    font-size: 12px;

    color: #6c757d;

}


/*=========================================================
    SIDEBAR COLLAPSED
=========================================================*/

body.sidebar-collapsed .app-sidebar {

    width: 70px;

}


body.sidebar-collapsed .sidebar-header,
body.sidebar-collapsed .sidebar-section-title,
body.sidebar-collapsed .sidebar-link span:not(.sidebar-icon),
body.sidebar-collapsed .sidebar-version {

    display: none;

}


body.sidebar-collapsed .sidebar-link {

    justify-content: center;

}


body.sidebar-collapsed .sidebar-icon {

    width: auto;

}


/*=========================================================
    MOBILE
=========================================================*/

@media (
    max-width: 768px
) {

    .app-sidebar {

        position: fixed;

        left: 0;

        top: 64px;

        bottom: 0;

        z-index: 999;

        transform: translateX(-100%);

    }


    body.sidebar-mobile-open .app-sidebar {

        transform: translateX(0);

    }


    .main-content {

        padding: 16px;

        width: 100%;

    }


    .user-details {

        display: none;

    }


    .app-footer {

        padding: 10px 16px;

    }

}