
body {
    font-family: "Inter", sans-serif !important;
    font-optical-sizing: auto;
}

a {
    text-decoration: none;
}

::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
    -webkit-border-radius: 10px;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    -webkit-border-radius: 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.3);
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
}

::-webkit-scrollbar-thumb:window-inactive {
    background: rgba(255, 255, 255, 0.3);
}











:root {
    --primary-blue: #3b4de4;
    --primary-light: #f0f4ff;
    --active-link: #033576;
    --active-link-bg: #eff6ff;
    --text-main: #364153;
    --text-muted: #6a7282;
    --border-color: #e5e7eb;
    --danger-red: #dc2626;
    --bg-white: #ffffff;
}

/* --- 1. Sidebar Layout --- */
.sidebar {
    position: relative;
    width: 100%;
    background-color: var(--bg-white);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    font-family: inherit;
    /* overflow-y: auto; */
}

/* --- 2. Profile Section --- */
.profile-section {
    padding: 20px;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.bg-color {
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
    width: 100%;
    height: 70px;
    background-color: var(--primary-blue);
    border-radius: 12px 12px 0 0;
}

.avatar-container {
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px solid var(--bg-white);
    bottom: -20px;
}

.profile-card {
    color: var(--bg-white);
    border-radius: 12px;
    padding: 50px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.profile-avatar {
    width: 100%;
    border-radius: 50%;
    border: 2px solid var(--bg-white);
    margin-bottom: 12px;
    object-fit: cover;
}

.profile-name {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #101828;
}

.profile-role,
.profile-id {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
    margin: 0 0 4px 0;
}

.profile-role > span {
    color: var(--primary-blue);
}

.profile-id > span {
    color: var(--text-main);
}

/* --- 3. Base Icons --- */
.icon {
    width: 1.3rem;
    height: 1.3rem;
    color: var(--text-main);
    transition: color 0.2s ease;
}

.submenu-icon {
    width: 18px;
    height: 18px;
    color: currentColor; /* Inherits the color of the link text automatically */
}

/* --- 4. Main Navigation Menu --- */
.nav-menu {
    flex: 1;
    padding: 10px 20px;
    list-style: none;
    margin: 0;
}

.nav-item {
    width: 100%;
    margin-bottom: 4px;
}

.nav-link {
    width: 100%;
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 12px 24px;
    color: var(--text-main);
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.2s ease;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.sidebar-nav-link{
    width: 100% !important;
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
    padding: 12px 24px !important;
    color: var(--text-main) !important;
    border-radius: 12px !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    transition: all 0.2s ease !important;
    cursor: pointer;
    border-left: 3px solid transparent !important;
}

.nav-link > span {
    color: var(--text-main);
    transition: color 0.2s ease;
}

/* Shared Hover & Active States */
.nav-link:hover,
.nav-link:hover > span,
.nav-link:hover > .icon,
.nav-item.active > .nav-link,
.nav-item.active > .nav-link > span,
.nav-item.active > .nav-link > .icon {
    background-color: var(--active-link-bg);
    color: var(--active-link);
}

/* --- 5. Accordion Dropdown Specifics --- */
.dropdown-toggle {
    justify-content: space-between;
}

.dropdown-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Animate Dropdown Chevron */
.dropdown-toggle > .icon:last-child {
    transition: transform 0.3s ease-in-out;
}

.has-dropdown.active .dropdown-toggle > .icon:last-child {
    transform: rotate(90deg);
}

.has-dropdown.is-open .dropdown-toggle > .icon:last-child {
    transform: rotate(90deg);
}

/* Smooth Submenu Logic */
.submenu {
    display: block !important; /* Critical for JS height calculation */
    height: 0px;
    overflow: hidden; /* Critical to hide links when closed */
    transition: height 0.3s ease-in-out;
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #fafafa;
}

.submenu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px 10px 48px; /* Indents the submenu nicely */
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s ease;
}

.submenu-link:hover {
    color: var(--active-link);
}

/* --- 6. Logout Section --- */
.logout-section {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--danger-red);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: opacity 0.2s ease;
}

.logout-btn:hover {
    opacity: 0.8;
}

.logout-icon {
    width: 1.3rem;
    height: 1.3rem;
    color: var(--danger-red);
}

.collapsed .nav-link {
    justify-content: center !important;
    padding: 12px 0 !important;
}

.collapsed .nav-link .icon {
    margin-right: 0 !important;
}

/* --- Collapsed Profile Card Styles --- */

.collapsed .profile-section {
    padding: 15px 5px !important;
}

.collapsed .bg-color {
    height: 50px !important;
}

.collapsed .avatar-container {
    bottom: -37px !important;
}

.collapsed .profile-name,
.collapsed .profile-role,
.collapsed .profile-id {
    display: none !important;
}

.collapsed .profile-card {
    padding: 30px 5px 10px 5px !important;
    height: 200px;
}

.collapsed .logout-btn {
    justify-content: center;
}

.icon {
    width: 1.3rem;
    height: 1.3rem;
}


.sidebar-icon {
    width: 22px;
    height: 22px;
    color: var(--text-main);
    transition: color 0.2s ease;
}
