/* Header Styles */
.header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding: 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 20px;
    width: 100%;
    margin: 0 auto;
    max-width: 1400px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.logo-section img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
}

.logo-section h2 {
    font-size: 18px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    justify-content: center;
}

.nav-menu a {
    font-weight: 500;
    color: var(--text-dark);
    transition: color 0.3s;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.user-section {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.user-profile {
    display: none;
    align-items: center;
    gap: 10px;
}

.btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    color: var(--text-dark);
    transition: all 0.3s;
    position: relative;
    font-size: 14px;
}

.btn-icon:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.notification-btn .notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger-color);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.profile-dropdown {
    position: relative;
}

/* Profile trigger as button */
.profile-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--bg-light);
    transition: all 0.3s;
    border: none;
    font-family: inherit;
    color: inherit;
}

.profile-trigger:hover {
    background: #e5e7eb;
}

.dropdown-item.logout {
    color: var(--danger-color);
    border-top: 1px solid var(--border-color);
    margin-top: 8px;
    padding-top: 16px;
    width: 100%;
    background: none;
    text-align: left;
    border-left: none;
    border-right: none;
    border-bottom: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.profile-pic {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid var(--primary-light);
    object-fit: cover;
}

.user-name {
    font-weight: 500;
    font-size: 13px;
    color: var(--text-dark);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-menu {
    position: absolute;
    top: 120%;
    right: 0;
    min-width: 220px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 100;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.2s;
}

.dropdown-item i {
    width: 20px;
    color: var(--primary-color);
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #FEF3C7 0%, #FED7AA 100%);
    transform: translateX(4px);
}

.dropdown-item.logout {
    color: var(--danger-color);
    border-top: 1px solid var(--border-color);
    margin-top: 8px;
    padding-top: 16px;
}

.dropdown-item.logout i {
    color: var(--danger-color);
}

.dropdown-item.logout:hover {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    padding: 8px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    background: var(--bg-light);
}

.mobile-menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text-dark);
    transition: all 0.3s;
}

/* Desktop/Mobile visibility helpers */
.desktop-only {
    display: inline-flex !important;
}

.mobile-only {
    display: none !important;
}

/* Mobile Menu Modal */
.mobile-menu-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 60px;
}

.mobile-menu-modal.active {
    display: flex;
}

.mobile-menu-content {
    background: white;
    width: 90%;
    max-width: 400px;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-height: 80vh;
    overflow-y: auto;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.mobile-menu-header h3 {
    font-size: 18px;
    color: var(--text-dark);
    font-weight: 700;
}

.mobile-menu-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-light);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-dark);
    transition: all 0.2s;
}

.mobile-menu-close:hover {
    background: var(--primary-color);
    color: white;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-menu-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.2s;
    font-size: 15px;
}

.mobile-menu-links a i {
    width: 24px;
    color: var(--primary-color);
    font-size: 16px;
}

.mobile-menu-links a:hover,
.mobile-menu-links a.active {
    background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%);
    transform: translateX(4px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: block !important;
    }
    .navbar {
        padding: 5px 10px;
    }

    .nav-menu {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: flex;
        gap: 3px;
        padding: 5px;
        order: 2;
    }

    .mobile-menu-toggle span {
        width: 18px;
        height: 2px;
    }

    .user-name {
        display: none;
    }

    .profile-pic {
        width: 28px;
        height: 28px;
    }

    .btn-icon {
        width: 32px;
        height: 32px;
        font-size: 13px;
        display: none !important;
    }

    .user-section {
        gap: 8px;
        display: flex;
        align-items: center;
    }

    .user-profile {
        order: 3;
    }

    .profile-trigger {
        padding: 2px 4px;
        gap: 3px;
        background: transparent;
    }
    
    .profile-trigger:hover {
        background: transparent;
    }
    
    .profile-trigger i {
        font-size: 10px;
    }

    .profile-dropdown {
        order: 3;
    }

    .dropdown-menu {
        min-width: 200px;
        right: 0;
    }

    .logo-section {
        order: 1;
    }

    .logo-section h2 {
        font-size: 15px;
    }

    .logo-section img {
        width: 28px;
        height: 28px;
    }
    
    .logo-section {
        gap: 6px;
    }

    /* Show notifications and chat in dropdown on mobile */
    .nav-menu a {
        padding: 12px 16px;
        border-radius: 8px;
        transition: background 0.2s;
    }

    .nav-menu a:hover {
        background: var(--bg-light);
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
        padding: 10px 20px;
    }
}
