﻿body {
    font-family: 'Encode Sans', sans-serif;
}
.sidebar {
    width: 250px;
    height: 100dvh; 
    background-color: #ffffff;
    color: #000000;
    padding: 0.75rem;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: width .3s ease;
}

    .sidebar h2 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
        text-align: center;
        color: #000000;
    }

.sidebar-logo {
    padding: 6px 0 10px 0;
    border-bottom: 1px solid #ccc;
    text-align: center;
}

    .sidebar-logo img {
        max-height: clamp(40px, 7.3vh, 60px);
    }
    .sidebar-logo .logo-collapsed {
        display: none;
    }

    .sidebar-logo .logo-normal {
        display: inline-block;
        max-height: clamp(40px, 7.3vh, 60px);
    }

.sidebar.collapsed .logo-normal {
    display: none;
}

.sidebar.collapsed .logo-collapsed {
    display: inline-block;
    max-height: clamp(38px, 6.2vh, 54px);
}
.nav-item,
.nav-parent > .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: clamp(0.40rem, 1.2vh, 0.60rem);
    line-height: 1.1;
    border-radius: 0.375rem;
    margin-bottom: clamp(0.18rem, 0.6vh, 0.35rem);
    text-decoration: none;
    color: #000000;
    transition: background 0.2s;
}

    .nav-item span,
    .nav-parent > .dropdown-toggle span {
        font-size: clamp(0.88rem, 1.9vh, 0.98rem);
    }

    .nav-item:hover,
    .nav-parent > .dropdown-toggle:hover {
        background-color: #f1f1f1;
        color: #000000;
    }

.nav-icon {
    margin-right: 0;
    flex: 0 0 auto;
    font-size: clamp(1rem, 2.2vh, 1.15rem);
}

.nav-section {
    font-size: 0.8rem;
    color: #6b7280;
    margin-left: 2.5rem;
}

.nav-parent {
    display: flex;
    flex-direction: column;
}

.dropdown-toggle {
    cursor: pointer;
    width: 100%;
}

.submenu {
    display: none;
    flex-direction: column;
    padding-left: 1.25rem;
    margin-top: -0.2rem;
}

.nav-subitem {
    padding: 0.45rem 0.60rem;
    color: #000000;
    font-size: 0.9rem;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: background 0.2s;
}

    .nav-subitem:hover {
        background-color: #e9ecef;
    }

.nav-parent:hover .submenu {
    display: flex;
}

.sidebar a {
    color: #000000 !important;
}

    .sidebar a:visited {
        color: #000000 !important;
    }

    .sidebar a:hover {
        color: #000000 !important;
    }

    .sidebar a:active {
        color: #000000 !important;
    }

.sidebar-footer {
    margin-top: auto;
    padding-top: 0.4rem;
    border-top: 1px solid #eee;
}

.nav-item-button {
    width: 100%;
    background: transparent;
    border: 0;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: clamp(0.40rem, 1.2vh, 0.60rem);
    border-radius: 0.375rem;
    margin-top: 0.25rem;
    font: inherit;
}

    .nav-item-button:hover {
        background-color: #f1f1f1;
    }

.sidebar.collapsed {
    width: 110px;
}

    .sidebar.collapsed .nav-item span,
    .sidebar.collapsed .nav-item-button span:not(#toggleSidebarIconTxt) {
        display: none;
    }

.sidebar .nav-item i {
    margin-right: 0;
}

.sidebar.collapsed .nav-item i,
.sidebar.collapsed .nav-item-button i {
    margin: auto;
}

.main-content {
    margin-left: 250px;
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed ~ .main-content {
    margin-left: 120px;
}


.user-initials {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: #0c3d68;
    color: #fff;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
a.user-initials {
    cursor: pointer;
}

    a.user-initials:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0,0,0,.2);
    }
.user-initials--disabled {
    opacity: .6;
    cursor: default;
}

.admin-badge {
    background: #ffe9c7;
    color: #7a4b00;
    border: 1px solid #f5ca86;
}
.user-name {
    font-size: 12px;
    text-align: center;
    color: #333;
}

.dropdown-menu-user {
    transition: all 0.2s ease-in-out;
}

    .dropdown-menu-user .dropdown-item {
        padding: 8px 12px;
    }

.footer-ps {
    background: #f8f9fa !important;
    border-top: 1px solid #dee2e6;
    font-size: 0.92rem;
    padding-top: 0.7rem !important;
    padding-bottom: 0.7rem !important;
}

    .footer-ps a {
        font-size: 0.92rem;
    }

    .footer-ps ul, .footer-ps p, .footer-ps h6 {
        margin-bottom: 0.45rem;
    }

@media (max-width: 992px) {
    .main-content {
        margin-left: 0;
    }
}
@media (max-height: 820px) {
    .nav-item,
    .nav-item-button {
        padding: 0.45rem 0.55rem;
    }

        .nav-item span {
            font-size: 0.9rem;
        }

    .sidebar-logo img {
        max-height: 42px;
    }
}

@media (max-height: 700px) {
    .nav-item,
    .nav-item-button {
        padding: 0.38rem 0.5rem;
    }

        .nav-item span {
            font-size: 0.86rem;
        }

    .sidebar-logo img {
        max-height: 38px;
    }
}
