﻿
.flex {
    display: flex;
    align-items: center;
}

.logo_items {
    justify-content: center;
    position: relative;
    padding: 15px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
}

.logo_items #sidebar-close {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.nav_image {
    display: flex;
    min-width: 55px;
    justify-content: center;
}

.nav_image img {
    height: 35px;
    width: 35px;
    border-radius: 50%;
    object-fit: cover;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 270px;
    background: linear-gradient(180deg, #1e3a5f 0%, #0f2744 100%);
    padding: 15px 10px 25px 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
    z-index: 3;
}

.logo_name {
    padding: 10px;
    font-size: 22px;
    color: #fff;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.logo_name img {
    max-width: 180px;
    height: auto;
    object-fit: contain;
}

#lock-icon,
#sidebar-close {
    padding: 10px;
    color: #fff;
    font-size: 25px;
    cursor: pointer;
    margin-left: -4px;
    transition: all 0.3s ease;
}

#sidebar-close {
    display: none;
    color: #fff;
}

.menu_container {
    display: flex;
    flex-direction: column;
    margin-top: 40px;
    height: calc(100% - 110px);
}

.menu_items {
    flex: 1;
    overflow-y: auto;
}

.menu_items::-webkit-scrollbar {
    display: none;
}

.menu_title {
    position: relative;
    height: 50px;
    width: 100%;
}

.menu_title .title {
    margin-left: 15px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.menu_title .line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    height: 3px;
    width: 20px;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.menu_title .line {
    opacity: 0;
}

.item {
    list-style: none;
}

.link {
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
}

.link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}
.link-active,
.link-active .link,
.link-active .link span {
    color: #1e3a5f !important;
}
.link-active  {
    background: linear-gradient(to right, #ffffff, #f0f0f0);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.link-logout {
    color: #fff !important;
    background: rgb(244, 106, 106) !important;
}

.link-logout:hover {
    color: #fff !important;
    background: rgb(244, 106, 106) !important
}

.link span {
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
}

.link i {
    height: 44px;
    min-width: 50px;
    display: flex;
    font-size: 20px;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.2s ease;
}

.link:hover i {
    color: #fff;
}

.link-active i {
    color: #1e3a5f !important;
}

.sidebar_profile {
    flex-shrink: 0;
    padding-top: 15px;
    padding-bottom: 20px;
    margin-top: 15px;
    gap: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar_profile .name {
    font-size: 18px;
    color: #fff;
}

.sidebar_profile .email {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
}

/* Navbar */
.navbar {
    max-width: 500px;
    width: 100%;
    position: fixed;
    top: 0;
    left: 60%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 0 0 8px 8px;
    justify-content: space-between;
    z-index: 100;
}

#sidebar-open {
    font-size: 30px;
    color: #333;
    cursor: pointer;
    margin-right: 20px;
    display: none;
}

.search_box {
    height: 46px;
    max-width: 500px;
    width: 100%;
    border: 1px solid #aaa;
    outline: none;
    border-radius: 8px;
    padding: 0 15px;
    font-size: 18px;
    color: #333;
}

.navbar img {
    height: 40px;
    width: auto;
    margin-left: 20px;
}

.logo_name img {
    height: 40px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

/* Mobile navbar logo - hide on desktop */
.navbar-logo-center {
    display: none;
}

.navbar-spacer {
    display: none;
}

/* Sidebar profile menu items */
.sidebar_profile .menu_item {
    width: 100%;
}

.sidebar_profile .item {
    border-radius: 5px;
}

.link-logout i {
    color: white;
}

.link-logout span {
    color: white;
}

/* Main content layout */
.main-content {
    margin-left: 275px;
    transition: margin-left 0.3s ease;
}

.page-content {
    padding: 2px;
}

/* Footer */
.footer {
    left: 75px;
    margin-top: 60px;
}

.footer a {
    color: inherit;
    text-decoration: none;
}

@media screen and (max-width: 1100px) {
    /* Sidebar hidden by default on mobile/tablet */
    .sidebar {
        left: -100% !important;
        z-index: 99999 !important;
    }

    /* Show sidebar when mobile-open class is added */
    .sidebar.mobile-open {
        left: 0 !important;
    }

    #sidebar-close {
        display: block !important;
    }

    #lock-icon {
        display: none !important;
    }

    .navbar {
        left: 0;
        max-width: 100%;
        transform: translateX(0%);
        background: #fff;
        box-shadow: rgba(0, 0, 0, 0.45) 0px 25px 20px -20px;
        justify-content: space-between;
        padding: 10px 15px;
    }

    /* Show centered logo on mobile */
    .navbar-logo-center {
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 1;
    }

    .navbar-logo-center img {
        height: 45px;
        width: auto;
        max-width: 200px;
        object-fit: contain;
        margin: 0;
    }

    /* Spacer to balance the hamburger menu */
    .navbar-spacer {
        display: block;
        width: 46px; /* Same width as hamburger button */
    }

    #sidebar-open {
        display: block !important;
    }

    .main-content {
        margin-left: 0px !important;
        margin-top: 60px !important;
    }
}

/* Notification dropdown scroll container */
.notification-scroll {
    max-height: 230px;
}
