/* Professional Header - Clean & Modern */

.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 50;
    transition: all 0.3s ease;
}

.main-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

/* Logo */
.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    font-weight: 700;
    font-size: 1.5rem;
    color: #1f2937;
    transition: color 0.3s ease;
}

.header-logo:hover {
    color: #2563eb;
    text-decoration: none;
}

.header-logo-icon {
    width: 32px;
    height: 32px;
    color: #2563eb;
    margin-right: 12px;
    transition: transform 0.3s ease;
}

/* Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #2563eb;
    background: #f8fafc;
    text-decoration: none;
}

.nav-link.active {
    color: #2563eb;
    background: #eff6ff;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: none;
    border: none;
    cursor: pointer;
}

.dropdown-toggle:hover {
    color: #2563eb;
    background: #f8fafc;
}

.dropdown-icon {
    width: 16px;
    height: 16px;
    margin-left: 6px;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 10px 16px;
    color: #4b5563;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: #f8fafc;
    color: #2563eb;
    text-decoration: none;
}

/* Auth Area */
.auth-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-welcome {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    margin-right: 8px;
}

/* Button styles removed - using dedicated buttons.css system */

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    padding: 8px;
    border-radius: 8px;
    background: none;
    border: none;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.mobile-menu-icon {
    width: 24px;
    height: 24px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        height: 64px;
    }
    
    .header-logo {
        font-size: 1.25rem;
    }
    
    .header-logo-icon {
        width: 28px;
        height: 28px;
        margin-right: 8px;
    }
    
    .main-nav {
        display: none;
    }
    
    .auth-area {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    /* Show mobile menu elements only on mobile */
    .mobile-menu-overlay {
        display: block;
    }
    
    .mobile-menu {
        display: flex;
    }
}

/* =================================
   MOBILE MENU IMPLEMENTATION
   ================================= */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
    display: none; /* Hide by default */
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 320px;
    max-width: 85vw;
    background: white;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    display: none; /* Hide by default */
    flex-direction: column;
}

.mobile-menu.active {
    transform: translateX(0);
}

/* Ensure mobile menu shows correctly when active on mobile only */
@media (max-width: 768px) {
    .mobile-menu.active {
        display: flex;
    }
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: sticky;
    top: 0;
    z-index: 1;
}

.mobile-menu-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #1f2937;
    font-weight: 700;
    font-size: 1.25rem;
}

.mobile-menu-logo-icon {
    width: 28px;
    height: 28px;
    color: #2563eb;
    margin-right: 8px;
}

.mobile-menu-close {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 8px;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-close:hover {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.mobile-menu-close-icon {
    width: 20px;
    height: 20px;
}

.mobile-menu-content {
    flex: 1;
    padding: 0;
}

/* Mobile Navigation Links */
.mobile-nav-section {
    padding: 24px 0;
    border-bottom: 1px solid #f1f5f9;
}

.mobile-nav-section:last-child {
    border-bottom: none;
}

.mobile-nav-title {
    padding: 0 24px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 16px;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-nav-link:hover {
    background: #eff6ff;
    color: #2563eb;
    text-decoration: none;
    transform: translateX(4px);
}

.mobile-nav-link.active {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}

.mobile-nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: #2563eb;
    border-radius: 0 2px 2px 0;
}

.mobile-nav-icon {
    width: 20px;
    height: 20px;
    color: currentColor;
    flex-shrink: 0;
}

/* Mobile Dropdown */
.mobile-dropdown {
    margin: 2px 0;
}

.mobile-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
}

.mobile-dropdown-toggle:hover {
    background: #eff6ff;
    color: #2563eb;
}

.mobile-dropdown-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.mobile-dropdown.active .mobile-dropdown-icon {
    transform: rotate(180deg);
}

.mobile-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f8fafc;
    margin: 4px 0;
    border-radius: 8px;
}

.mobile-dropdown.active .mobile-dropdown-content {
    max-height: 300px;
}

.mobile-dropdown-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.mobile-dropdown-link:hover {
    background: #e2e8f0;
    color: #2563eb;
    text-decoration: none;
}

/* Mobile Auth Section */
.mobile-auth-section {
    padding: 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-top: 1px solid #f1f5f9;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mobile-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
    overflow: hidden;
}

.mobile-user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-user-details {
    flex: 1;
    min-width: 0;
}

.mobile-user-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 16px;
    margin-bottom: 2px;
}

.mobile-user-role {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.mobile-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Mobile button styles handled by buttons.css */

/* Animation Delays for Staggered Effect */
.mobile-nav-link {
    opacity: 0;
    transform: translateX(20px);
    animation: slideInLeft 0.4s ease forwards;
}

.mobile-menu.active .mobile-nav-link:nth-child(1) { animation-delay: 0.1s; }
.mobile-menu.active .mobile-nav-link:nth-child(2) { animation-delay: 0.15s; }
.mobile-menu.active .mobile-nav-link:nth-child(3) { animation-delay: 0.2s; }
.mobile-menu.active .mobile-nav-link:nth-child(4) { animation-delay: 0.25s; }
.mobile-menu.active .mobile-nav-link:nth-child(5) { animation-delay: 0.3s; }

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =================================
   PROFILE DROPDOWN
   ================================= */

.profile-dropdown {
    position: relative;
}

.profile-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #1f2937;
    font-size: 14px;
}

.profile-toggle:hover {
    background: #f8fafc;
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.profile-toggle.active {
    background: #eff6ff;
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.nav-profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
    overflow: hidden;
}

.nav-profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-profile-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.nav-profile-name {
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.nav-profile-role {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.profile-chevron {
    width: 16px;
    height: 16px;
    color: #6b7280;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.profile-toggle.active .profile-chevron {
    transform: rotate(180deg);
}

/* Profile Menu */
.profile-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 0;
    min-width: 280px;
    opacity: 0;
    visibility: hidden;
    display: none;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow: hidden;
}

.profile-dropdown.active .profile-menu {
    opacity: 1;
    visibility: visible;
    display: block;
    transform: translateY(0) scale(1);
}

.profile-menu-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 1px solid #f1f5f9;
}

.profile-menu-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
    overflow: hidden;
}

.profile-menu-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-menu-info {
    min-width: 0;
    flex: 1;
}

.profile-menu-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 16px;
    margin-bottom: 2px;
}

.profile-menu-email {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.profile-menu-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 0;
}

.profile-menu-items {
    padding: 8px 0;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #4b5563;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.profile-menu-item:hover {
    background: #f8fafc;
    color: #2563eb;
    text-decoration: none;
}

.profile-menu-icon {
    width: 18px;
    height: 18px;
    color: currentColor;
    flex-shrink: 0;
}

.profile-logout-form {
    margin: 0;
    padding: 0;
}

.profile-logout {
    color: #dc2626 !important;
    border-top: 1px solid #f1f5f9;
    margin-top: 4px;
    padding-top: 16px;
}

.profile-logout:hover {
    background: #fef2f2 !important;
    color: #b91c1c !important;
}

/* Responsive Profile Dropdown */
@media (max-width: 768px) {
    .profile-toggle {
        padding: 6px 8px;
        gap: 8px;
    }
    
    .nav-profile-info {
        display: none;
    }
    
    .nav-profile-avatar {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .profile-menu {
        min-width: 260px;
        right: -20px;
    }
    
    .profile-menu-header {
        padding: 16px;
    }
    
    .profile-menu-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* Accessibility */
.skip-to-content {
    position: absolute;
    left: 0;
    top: 0;
    padding: 8px 16px;
    background: #2563eb;
    color: white;
    text-decoration: none;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: 1001;
}

.skip-to-content:focus {
    transform: translateY(0);
}

 