.site-header {
    background: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.site-header-inner {
    max-width: 1300px;
    margin: 0 auto;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    gap: 2rem;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-left { flex: 1; }

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

.header-search-bar {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.3rem;
    width: 100%;
    max-width: 400px;
    transition: all 0.2s ease;
}
.header-search-bar:focus-within {
    background: #ffffff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.header-search-bar svg {
    color: #64748b;
    margin-left: 0.5rem;
}
.header-search-bar input {
    border: none;
    background: transparent;
    padding: 0.5rem;
    width: 100%;
    outline: none;
    font-size: 0.95rem;
    color: #1e293b;
}
.header-search-btn {
    max-width: 100px;
    background: #3b82f6;
    color: #fff;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
.header-search-btn:hover { background: #2563eb; }

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.main-nav > a {
    text-decoration: none;
    color: #475569;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}
.main-nav > a:hover {
    color: #3b82f6;
}

.header-btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #3b82f6 0%, #d81b60 100%); 
    color: #ffffff !important;
    padding: 0.6rem 1.4rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
    border: none;
}

.main-nav > a.header-btn-cta:hover {
    background: linear-gradient(135deg, #2563eb 0%, #ff005d 100%) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.4);
}

.header-btn-cta svg {
    transition: transform 0.3s ease;
}

.main-nav > a.header-btn-cta:hover svg {
    transform: scale(1.15); 
}

.profile { position: relative; }
.profile-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
    padding: 0.3rem;
    border-radius: 30px;
    transition: background 0.2s;
    user-select: none;
	-webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
    .profile-toggle:hover { background: #f8fafc; }
}
.avatar {
    width: 36px;
    height: 36px;
    background: #cbd5e1;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-weight: 600; color: #1e293b; font-size: 0.95rem; }

.profile-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 240px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    padding: 0.5rem 0;
}

.profile.is-open .profile-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-menu a, .profile-menu button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.6rem 1.2rem;
    color: #475569;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s;
}
.profile-menu a:hover, .profile-menu button:hover {
    background: #f8fafc;
    color: #3b82f6;
}
.profile-menu svg { width: 18px; height: 18px; color: #64748b; }
.profile-menu a:hover svg, .profile-menu button:hover svg { color: #3b82f6; }

.header-menu-toggle { 
    display: none; 
    background: none; 
    border: none; 
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer; 
    color: #1e293b; 
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-menu { display: none; }

@media (max-width: 992px) {
    .header-search-bar { display: none; } 
    .main-nav > a:not(.header-btn-cta) { display: none; }
    .profile-name { display: none; }
    
    .header-menu-toggle { display: block; }
    @media (hover: hover) {
        .header-menu-toggle:hover {
            background-color: #f1f5f9;
            color: #3b82f6;
        }
    }
    
    .mobile-menu {
        display: flex; 
        flex-direction: column;
        position: fixed;
        top: 70px; 
        right: 0;
        width: 100%;
        max-width: 320px;
        height: calc(100vh - 70px);
        background: #fff;
        padding: 1rem;
        gap: 1rem;
        box-shadow: -5px 0 15px -3px rgba(0,0,0,0.1);
        z-index: 999;
        overflow-y: auto;
        
        transform: translateX(100%);
        opacity: 0;
        visibility: hidden;
        
        transition: all 0.3s ease-in-out;
    }
    
    .mobile-menu.is-open {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }
    
    .mobile-menu a { 
        text-decoration: none; 
        font-weight: 600; 
        color: #1e293b; 
        padding: 0.5rem 0; 
        border-bottom: 1px solid #f1f5f9; 
    }
}


.profile-toggle .avatar {
    position: relative !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    overflow: visible !important;
}

.header-msg-badge {
    position: absolute !important;
    top: -6px !important;
    right: -10px !important;
    background-color: #ef4444 !important;
    color: #ffffff !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    padding: 2px 5px !important;
    min-width: 18px !important;
    height: 18px !important;
    border-radius: 10px !important;
    border: 2px solid #ffffff !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    line-height: 1 !important;
    z-index: 9999 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3) !important;
}

.profile-menu a.has-unread-menu,
.mobile-menu a.has-unread-menu {
    background-color: #fef2f2 !important;
    color: #b91c1c !important;
    font-weight: 600;
}

.mobile-menu a.has-unread-menu {
    border-left: 4px solid #ef4444;
}

.menu-msg-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border-radius: 50%;
    margin-left: auto;
    box-shadow: 0 0 4px rgba(239,68,68,0.5);
}

.header-avatar-img {
    border-radius: 50%;
    object-fit: cover;
    width: 100%;
    height: 100%;
}