
/* Sidebar Menu Styles */
.menu-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border: none;
    cursor: pointer;
    color: var(--gray-800);
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.menu-toggle-btn:hover {
    background: var(--primary-green);
    color: white;
    transform: scale(1.05);
}

.sidebar {
    position: fixed;
    left: -320px;
    top: 0;
    width: 320px;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1050;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: linear-gradient(135deg, var(--primary-green) 0%, #059669 100%);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
}

.sidebar-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    backdrop-filter: blur(10px);
}

.sidebar-close {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.sidebar-content {
    padding: 1rem 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--gray-800);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.sidebar-item i {
    width: 20px;
    text-align: center;
    color: var(--gray-600);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.sidebar-item:hover {
    background: var(--gray-100);
    color: var(--primary-green);
    border-left-color: var(--primary-green);
    transform: translateX(5px);
}

.sidebar-item:hover i {
    color: var(--primary-green);
    transform: scale(1.1);
}

.sidebar-item.active {
    background: var(--light-green);
    color: var(--primary-green);
    border-left-color: var(--primary-green);
    font-weight: 600;
}

.sidebar-item.active i {
    color: var(--primary-green);
}

.sidebar-section-title {
    padding: 1.5rem 1.5rem 0.75rem;
    color: var(--gray-600);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
}

/* Sidebar Dropdown Styles */
.sidebar-dropdown {
    position: relative;
}

.sidebar-dropdown-toggle {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    cursor: pointer;
}

.sidebar-item-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dropdown-arrow {
    font-size: 0.75rem;
    color: var(--gray-600);
    transition: transform 0.3s ease;
}

.sidebar-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
    color: var(--primary-green);
}

.sidebar-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--gray-100);
    border-left: 3px solid transparent;
}

.sidebar-dropdown.active .sidebar-dropdown-menu {
    max-height: 500px;
}

.sidebar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.5rem 0.875rem 3rem;
    color: var(--gray-800);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.sidebar-dropdown-item i {
    width: 18px;
    text-align: center;
    color: var(--gray-600);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.sidebar-dropdown-item:hover {
    background: white;
    color: var(--primary-green);
    border-left-color: var(--primary-green);
    padding-left: 3.25rem;
}

.sidebar-dropdown-item:hover i {
    color: var(--primary-green);
    transform: scale(1.1);
}

.sidebar-dropdown-item.active {
    background: white;
    color: var(--primary-green);
    border-left-color: var(--primary-green);
    font-weight: 600;
}

.sidebar-dropdown-item.active i {
    color: var(--primary-green);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1040;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Scrollbar Styling for Sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--gray-100);
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--gray-600);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-green);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
        left: -280px;
    }
    
    .menu-toggle-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* Animation for sidebar items */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sidebar.active .sidebar-item {
    animation: slideInLeft 0.3s ease forwards;
}

.sidebar.active .sidebar-item:nth-child(1) { animation-delay: 0.05s; }
.sidebar.active .sidebar-item:nth-child(2) { animation-delay: 0.1s; }
.sidebar.active .sidebar-item:nth-child(3) { animation-delay: 0.15s; }
.sidebar.active .sidebar-item:nth-child(4) { animation-delay: 0.2s; }
.sidebar.active .sidebar-item:nth-child(5) { animation-delay: 0.25s; }
.sidebar.active .sidebar-item:nth-child(6) { animation-delay: 0.3s; }
.sidebar.active .sidebar-item:nth-child(7) { animation-delay: 0.35s; }
.sidebar.active .sidebar-item:nth-child(8) { animation-delay: 0.4s; }
.sidebar.active .sidebar-item:nth-child(9) { animation-delay: 0.45s; }
.sidebar.active .sidebar-item:nth-child(10) { animation-delay: 0.5s; }

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-green);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: #059669;
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.scroll-top i {
    font-size: 1.25rem;
}
