/* CSS Variables for Blue Theme - Scoped to sidebar only */
.sidebar-wrapper {
    --bs-body-bg: #0f1535;
    --bs-body-bg-2: #181f4a;
    --bs-body-color: #d3d7dc;
    --bs-heading-color: #e6ecf0;
    --bs-border-color: rgba(255, 255, 255, 0.15);
    --bs-border-color-translucent: rgba(226, 232, 240, 0.15);
}

/* Template sidebar styles with dark blue theme */
.sidebar-wrapper {
    position: fixed;
    top: 56px; /* Account for navbar height */
    left: 0;
    width: 260px;
    height: calc(100% - 56px); /* Full height minus navbar */
    background-color: var(--bs-body-bg);
    border-right: 1px solid var(--bs-border-color);
    z-index: 1020; /* Below navbar (1030) but above other content */
    transition: ease-out 0.3s;
    box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.3);
}

.sidebar-wrapper .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: start;
    width: 260px;
    height: 70px;
    padding: 0 1rem;
    gap: 0.5rem;
    z-index: 1021;
    position: fixed;
    top: 56px; /* Account for navbar height */
    background-color: var(--bs-body-bg);
    transition: ease-out 0.3s;
    border-right: 1px solid var(--bs-border-color);
}

.sidebar-wrapper .sidebar-header .logo-img {
    width: 45px;
}

.sidebar-wrapper .sidebar-header .logo-name h5 {
    font-size: 24px;
    text-transform: capitalize;
    font-weight: 600;
    color: var(--bs-heading-color);
    margin-bottom: 0;
}

.sidebar-wrapper .sidebar-header .sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dee2e6;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    transition: all 0.3s;
    display: none;
    cursor: pointer;
}

.sidebar-wrapper .sidebar-header .sidebar-close:hover,
.sidebar-wrapper .sidebar-header .sidebar-close:focus {
    color: #ffffff;
    background-color: var(--bs-body-bg-2);
}

.sidebar-wrapper .sidebar-nav {
    margin-top: 70px; /* Space for sidebar header */
    height: calc(100% - 70px);
    background-color: var(--bs-body-bg);
    overflow-y: auto; /* Allow scrolling if menu is too long */
    padding-bottom: 50px; /* Add bottom padding to prevent last menu item from being too close to bottom */
}

.sidebar-wrapper .sidebar-nav ul {
    padding: 10px;
    margin: 0;
    list-style: none;
    background: 0 0;
}

.sidebar-wrapper .sidebar-nav .metismenu {
    background: 0 0;
    display: flex;
    flex-direction: column;
}

.sidebar-wrapper .sidebar-nav .metismenu li + li {
    margin-top: 5px;
}

.sidebar-wrapper .sidebar-nav .metismenu li:first-child {
    margin-top: 5px;
}

.sidebar-wrapper .sidebar-nav .metismenu li:last-child {
    margin-bottom: 5px;
}

.sidebar-wrapper .sidebar-nav .metismenu > li {
    display: flex;
    flex-direction: column;
    position: relative;
}

.sidebar-wrapper .sidebar-nav .metismenu a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: left;
    padding: 6px 16px;
    font-size: 15px;
    color: #a7acb1;
    outline-width: 0;
    text-overflow: ellipsis;
    overflow: hidden;
    letter-spacing: 0.5px;
    border-radius: 0.25rem;
    transition: all 0.3s ease-out;
    text-decoration: none;
}

.sidebar-wrapper .sidebar-nav .metismenu a .parent-icon {
    line-height: 1;
}

.sidebar-wrapper .sidebar-nav .metismenu a .menu-title {
    margin-left: 10px;
}

.sidebar-wrapper .sidebar-nav .metismenu a:active {
    color: #ffffff;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-wrapper .sidebar-nav .metismenu a:focus {
    color: #ffffff;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-wrapper .sidebar-nav .metismenu a:hover {
    color: #ffffff;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-wrapper .sidebar-nav .metismenu ul {
    background-color: var(--bs-body-bg);
    padding: 0;
}

.sidebar-wrapper .sidebar-nav .metismenu ul a {
    padding: 6px 15px 6px 20px;
    font-size: 15px;
    border: 0;
}

.sidebar-wrapper .sidebar-nav .metismenu ul a i {
    margin-right: 5px;
}

.sidebar-wrapper .sidebar-nav .metismenu ul ul a {
    padding: 8px 15px 8px 30px;
}

.sidebar-wrapper .sidebar-nav .metismenu ul ul ul a {
    padding: 8px 15px 8px 45px;
}

.sidebar-wrapper .sidebar-nav .metismenu .mm-active > a,
.sidebar-wrapper .sidebar-nav .metismenu a.mm-active {
    color: #ffffff;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-wrapper .menu-label {
    padding: 10px 16px 10px 16px;
    color: #b0afaf;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

/* Dropdown arrow styling */
.metismenu .has-arrow:after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-right: 2px solid #a7acb1;
    border-bottom: 2px solid #a7acb1;
    transform: translateY(-50%) rotate(45deg);
    transition: transform 0.3s ease;
}

.metismenu .has-arrow.mm-active:after {
    transform: translateY(-50%) rotate(225deg);
    border-color: #ffffff;
}

.metismenu .has-arrow:hover:after {
    border-color: #ffffff;
}

/* Material Icons styling */
.material-icons-outlined {
    font-family: 'Material Icons Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .sidebar-wrapper {
        transform: translateX(-100%);
    }
    
    .sidebar-wrapper.active {
        transform: translateX(0);
    }
    
    .sidebar-wrapper .sidebar-header .sidebar-close {
        display: flex;
    }
}

