/* Employee Sidebar Styles */
.sidebar {
    width: 280px;
    transition: all 0.3s ease;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 40;
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar-toggle {
    display: none;
}

.main-content {
    margin-left: 280px;
    transition: all 0.3s ease;
}

.main-content.expanded {
    margin-left: 80px;
}

.dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.dropdown-content.show {
    max-height: 300px;
}

.nav-item {
    transition: all 0.2s ease;
}

.nav-item:hover {
    background-color: rgba(37, 99, 235, 0.1);
    border-radius: 8px;
    transform: translateX(4px);
}

.nav-item.active {
    background-color: rgba(37, 99, 235, 0.2);
    border-radius: 8px;
    border-left: 4px solid #2563eb;
    color: #2563eb !important;
}

.nav-item.active .sidebar-text {
    color: #2563eb !important;
    font-weight: 600;
}

.nav-item.active i {
    color: #2563eb !important;
}

/* Active state for dropdown items */
.dropdown-content a.active {
    background-color: rgba(37, 99, 235, 0.1) !important;
    color: #2563eb !important;
    font-weight: 600;
    border-radius: 6px;
    border-left: 3px solid #2563eb;
}

/* Collapsed sidebar text hiding */
.sidebar.collapsed .sidebar-text {
    display: none;
}

.sidebar.collapsed .dropdown-content {
    display: none;
}

.sidebar.collapsed .nav-dropdown button::after {
    display: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .mobile-overlay {
        position: fixed;
        inset: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 30;
        display: none;
    }
    
    .mobile-overlay.show {
        display: block;
    }
}

/* Smooth animations */
.sidebar * {
    transition: all 0.2s ease;
}

/* Color scheme variables for consistency */
:root {
    --primary-blue: #2563eb;
    --primary-accent: #3b82f6;
    --text-heading: #0f172a;
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --text-muted: #94a3b8;
    --border-light: #e2e8f0;
}

/* Enhanced hover effects */
.nav-item:hover i {
    transform: scale(1.1);
}

/* User profile section styling */
.sidebar .border-t .flex.items-center {
    transition: all 0.2s ease;
}

.sidebar .border-t .flex.items-center:hover {
    background-color: rgba(37, 99, 235, 0.05);
    border-radius: 8px;
    padding: 8px;
}

/* Logout button special styling */
button.nav-item {
    border: none;
    background: none;
    font-family: inherit;
    font-size: inherit;
    text-align: left;
    cursor: pointer;
}

button.nav-item:hover {
    background-color: rgba(239, 68, 68, 0.1) !important;
    color: #dc2626 !important;
}

/* Focus states for accessibility */
.nav-item:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Tooltip for collapsed sidebar */
.sidebar.collapsed .nav-item {
    position: relative;
}

.sidebar.collapsed .nav-item:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: var(--text-heading);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    z-index: 50;
    margin-left: 8px;
}
