/* Main Layout Structure */
.main-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* Content Area */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    transition: margin-left 0.3s ease;
}

/* Menu Container */
.menu-container {
    width: 240px;
    min-width: 240px;
    background-color: #ffffff;
    height: 100vh;
    overflow-y: auto; 
    transition: all 0.3s ease;
    position: sticky;
    top: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

/* Collapsed State */
.menu-container.collapsed {
    width: 60px;
    min-width: 60px;
}

.menu-container.collapsed .menu-header .logo,
.menu-container.collapsed .dir-text,
.menu-container.collapsed .menu-text,
.menu-container.collapsed .user-name {
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease, display 0.3s ease;
}

.menu-container.collapsed .dir:after {
    display: none;
}

.menu-container.collapsed .menu-item {
    text-align: center;
    padding: 12px 0;
    justify-content: center;
}

.menu-container.collapsed .menu-icon {
    margin-right: 0;
    transform: scale(1.1);
}

.menu-container.collapsed .submenu {
    display: none !important;
}

/* Menu Header */
.menu-header {
    padding: 15px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    color: white;
    border-bottom: 1px solid #e0e0e0;
}

.logo-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
}

.logo {
    max-height: 50px;
}

.menu-container.collapsed .logo {
    max-width: 30px;
    opacity: 1;
    margin: 0 auto;
}

.hamburger-icon {
    font-size: 20px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #06ad6f;
    position: relative;
    z-index: 1;
}

.hamburger-icon:hover {
    color: #c7ffc8;
    transform: scale(1.1);
}

.toggle-menu {
    background: none;
    border: none;
    color: #06ad6f;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.toggle-menu:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.menu-container.collapsed .toggle-menu {
    display: none;
}

/* Menu Content */
.menu-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 80px;
}

/* Menu List */
.menu-list {
    list-style: none;
    padding-top: 10px;
    padding-left: 0 !important;
    background-color: #ffffff;
}

.menu-list li {
    position: relative;
}

.menu-list li a{
    color: #000;
}

/* Menu Items */
.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333333;
    text-decoration: none;
    border-left: 3px solid transparent;
    background-color: #ffffff;
}

.menu-item:hover {
    background-color: #c7ffc8;
    border-left: 3px solid #06ad6f;
    color: #06ad6f;
    text-decoration: none;
}

.menu-icon {
    margin-right: 10px;
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: #06ad6f;
}

.menu-text {
    flex: 1;
}

.menu-item.active {
    background-color: #06ad6f;
    color: white;
    border-left: 3px solid #06ad6f;
}

.menu-item.active .menu-icon {
    color: white;
}

.title-icon{
    font-size: 20px;
    width: 20px;
    text-align: center;
    color: #333399;
}

/* Directory Items */
.dir {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    position: relative;
    border-left: 3px solid transparent;
    background-color: #ffffff;
    color: #333333;
}

.dir:hover {
    background-color: #c7ffc8;
    color: #06ad6f;
}

.dir-text {
    flex: 1;
}

.dir:after {
    content: "▸";
    color: #06ad6f;
}

.dir.expanded:after {
    transform: rotate(90deg);
}

/* Submenu */
.submenu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: #f8f8f8;
}

.submenu li a {
    padding-left: 5px !important;
    background-color: #f8f8f8;
}

.submenu .submenu {
    padding-left: 10px;
}

.submenu.expanded {
    max-height: 1000px;
}

.submenu li .dir{
    padding-left: 5px;
    background: none;
}

/* User Profile */
/* .user-profile-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #f8f8f8;
    border-top: 1px solid #e0e0e0;
    padding: 5px;
} */
 
.user-profile-container {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #f8f8f8;
    border-top: 1px solid #e0e0e0;
    padding: 5px;
    z-index: 101;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
}

.menu-container.collapsed .user-profile {
    justify-content: center;
    padding: 12px 0;
}

.user-profile:hover {
    background-color: #eee;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #06ad6f;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    flex-shrink: 0;
}

.menu-container.collapsed .user-avatar {
    width: 22px;
    height: 22px;
    font-size: 10px;
    margin-left: 12px;
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
}

/* Dropdown Menu */
.user-menu-dropdown-menu {
    position: absolute;
    bottom: 60px;
    left: 10px;
    right: 10px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    z-index: 110;
    display: none;
}

.user-menu-dropdown-menu.show {
    display: block;
    animation: fadeInUp 0.2s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-menu-dropdown-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333;
    text-decoration: none;
}

.user-menu-dropdown-item:hover {
    background-color: #f0f0f0;
    color: #06ad6f;
    text-decoration: none;
}

.user-menu-dropdown-item i {
    width: 20px;
    text-align: center;
    color: #06ad6f;
}

/* Tooltip */
.tooltip {
    position: absolute;
    left: 70px;
    background: #06ad6f;
    padding: 5px 10px;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    white-space: nowrap;
    z-index: 100;
    display: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.menu-container.collapsed li:hover .tooltip,
.menu-container.collapsed .user-profile:hover .tooltip {
    display: block;
    animation: fadeIn 0.2s ease;
}

/* Only show arrow if there is a submenu */
.menu-list > li > .dir:not(:only-child)::after,
.submenu > li > .dir:not(:only-child)::after {
    content: "▶";
    font-size: 9px;
    /* your arrow styles */
}

/* Hide arrow if no submenu (dir with no submenu) */
.menu-list > li > .dir:only-child::after,
.submenu > li > .dir:only-child::after {
    content: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .menu-container {
        width: 200px;
        min-width: 200px;
    }
    
    .menu-container.collapsed {
        width: 50px;
        min-width: 50px;
    }
}

@media (max-width: 768px) {
    .menu-container {
        position: fixed;
        left: -260px;
        z-index: 1000;
        width: 260px;
    }
    
    .menu-container.collapsed {
        left: -60px;
        width: 60px;
    }
    
    .menu-container.mobile-visible {
        left: 0;
    }
    
    .content-area {
        margin-left: 0 !important;
    }
    
    /* Force collapsed state on mobile */
    .menu-container:not(.mobile-visible) {
        left: -260px;
    }
    
    .menu-container.collapsed:not(.mobile-visible) {
        left: -60px;
    }
}

/* Mobile Toggle Button (add to your HTML) */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 999;
    background: #06ad6f;
    color: white;
    border: none;
    border-radius: 10%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}