/* Professional Sidebar Styles */

.sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
    z-index: 100;
    transition: width 0.3s ease;
}

.sidebar-header {
    height: 70px;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    border-radius: 3px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 0 4px rgba(5, 150, 105, 0.25));
}

.sidebar-header h1 {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    white-space: nowrap;
}

/* Brand Icon Placeholder */
.sidebar-header h1::before {
    content: '';
    display: none;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 1rem;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Section Label */
.nav-section-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    font-weight: 600;
    letter-spacing: 0.05em;
    margin: 1.5rem 0 0.5rem 1rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1rem;
    color: #94A3B8;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transform: translateX(4px);
}

.nav-item.active {
    background: rgba(5, 150, 105, 0.18);
    color: white;
    border-left-color: var(--primary);
    box-shadow: none;
}

.nav-item .icon {
    width: 1.25rem;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.05);
}

.user-avatar {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,0.2);
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    margin: 0;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}

.user-role-badge.admin { background: #EF4444; color: white; }
.user-role-badge.pastor { background: #10B981; color: white; }
.user-role-badge.supervisor { background: #3B82F6; color: white; }
.user-role-badge.lider { background: #F59E0B; color: white; }
.user-role-badge.membro { background: #64748B; color: white; }

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: transparent;
    color: #94A3B8;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.1);
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    border-color: rgba(239, 68, 68, 0.3);
}

/* Toggle Button para Mobile */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    opacity: 0.8;
}

/* Mobile */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        max-width: 280px;
        height: calc(100vh - 60px);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 99;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-toggle {
        display: flex;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 101;
    }
    
    .sidebar-header {
        height: 60px;
        padding: 0 1rem;
    }
    
    .sidebar-header h1 {
        font-size: 1rem;
    }
    
    .sidebar-header h1::before {
        width: 24px;
        height: 24px;
    }
    
    .sidebar-nav {
        padding: 1rem 0.5rem;
        overflow-y: auto;
    }
    
    .sidebar-nav ul {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .nav-section-label {
        font-size: 0.7rem;
        margin: 1rem 0 0.5rem 1rem;
    }
    
    .nav-item {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        border-left: 3px solid transparent;
    }
    
    .sidebar-footer {
        padding: 1rem 0.5rem;
    }
}

/* Tablet */
@media (max-width: 1024px) and (min-width: 769px) {
    .sidebar {
        width: 240px;
    }
    
    .sidebar-header h1 {
        font-size: 1.1rem;
    }
    
    .nav-item {
        padding: 0.75rem 0.75rem;
        font-size: 0.9rem;
    }
}
