/* Navigation and sidebar styles */

.sidebar {
    width: 280px;
    background: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    overflow-y: auto;
    position: relative;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #34495e;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    color: white;
    margin: 0;
    font-size: 20px;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: background-color 0.2s;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-section {
    border-bottom: 1px solid #34495e;
}

.nav-item-header {
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
    user-select: none;
}

.nav-item-header:hover {
    background: #34495e;
}

.nav-arrow {
    margin-right: 10px;
    font-size: 12px;
    transition: transform 0.2s;
    width: 12px;
    text-align: center;
}

.nav-item-header.collapsed .nav-arrow {
    transform: rotate(-90deg);
}

.nav-subsection {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-subsection.active {
    max-height: 200px;
}

.nav-link {
    display: block;
    width: 100%;
    padding: 12px 20px 12px 40px;
    background: none;
    border: none;
    color: #bdc3c7;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.nav-link:hover {
    background: #34495e;
    color: white;
    padding-left: 45px;
}

.nav-link.active {
    background: #3498db;
    color: white;
    border-left: 4px solid #2980b9;
}

.sidebar-footer {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid #34495e;
}

.logout-btn {
    width: 100%;
    padding: 10px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.logout-btn:hover {
    background: #c0392b;
}

/* Main content area */
.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: white;
}

/* Tab content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive navigation */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -280px;
        z-index: 1000;
        height: 100vh;
        transition: left 0.3s ease;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .main-content {
        width: 100%;
    }
    
    .sidebar-toggle {
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1001;
        background: #2c3e50;
        color: white;
        border: none;
        padding: 10px;
        border-radius: 4px;
    }
}