/* Left Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    z-index: 1050;
    overflow-y: auto;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 2rem 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-brand {
    color: white;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.sidebar-brand:hover {
    color: #f8f9fa;
    transform: translateX(5px);
}

.sidebar-brand i {
    font-size: 1.5rem;
    margin-right: 0.75rem;
    color: #ffd700;
}

.sidebar-nav {
    padding: 1rem 0;
    list-style: none;
    margin: 0;
}

.sidebar-nav-item {
    margin: 0;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.sidebar-nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: width 0.3s ease;
    z-index: 0;
}

.sidebar-nav-link:hover::before {
    width: 100%;
}

.sidebar-nav-link:hover {
    color: white;
    border-left-color: #ffd700;
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.sidebar-nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    border-left-color: #ffd700;
    font-weight: 500;
}

.sidebar-nav-link i {
    width: 20px;
    margin-right: 0.75rem;
    font-size: 1.1rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.sidebar-nav-text {
    position: relative;
    z-index: 1;
    font-size: 0.95rem;
}

.sidebar-section {
    margin: 1rem 0;
}

.sidebar-section-title {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 1.5rem 0.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.sidebar-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1060;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.sidebar-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.sidebar-toggle.active {
    left: 300px;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

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

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

/* Main content adjustment when sidebar is open */
body.sidebar-open .main-content {
    margin-left: 280px;
    transition: margin-left 0.3s ease;
}

body.sidebar-open .navbar {
    margin-left: 280px;
    width: calc(100% - 280px);
    transition: all 0.3s ease;
}

/* Responsive design */
@media (max-width: 768px) {
    .sidebar {
        width: 250px;
        left: -250px;
    }
    
    .sidebar-toggle.active {
        left: 270px;
    }
    
    body.sidebar-open .main-content,
    body.sidebar-open .navbar {
        margin-left: 0;
        width: 100%;
    }
}

/* User profile section in sidebar */
.sidebar-user {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    color: white;
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700, #ff6b6b);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.sidebar-user-details h6 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
}

.sidebar-user-details small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
}

/* Badge for notifications */
.sidebar-badge {
    background: #ff6b6b;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
    min-width: 18px;
    text-align: center;
}

/* Sidebar scrollbar */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Maternal Health AI Logo Styling */
.sidebar-logo {
    max-width: 180px;
    height: auto;
    filter: brightness(1.1);
    transition: all 0.3s ease;
    margin: 0;
    display: block;
}

.sidebar-logo:hover {
    filter: brightness(1.2);
    transform: scale(1.02);
}

/* Responsive logo adjustments */
@media (max-width: 768px) {
    .sidebar-logo {
        max-width: 160px;
    }
}