
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: var(--primary-dark-color);
    box-shadow: 0px 10px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

/* ساختار داخلی هدر */
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
}

/* لوگو */
.logo img {
    height: 36px;
    width: auto;
    object-fit: contain;
}

/* دکمه‌های سمت راست */
.header-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* دکمه‌های عمومی */
.header-buttons .btn {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* دکمه اصلی */
.header-buttons .btn-primary {
    background: var(--primary-color);
    border: none;
    color: white;
}

.header-buttons .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    color: white;
}

/* دکمه outline */
.header-buttons .btn-outline-primary {
    border: 2px solid #667eea;
    color: #667eea;
    background: transparent;
}

.header-buttons .btn-outline-primary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* دکمه آیکونی */
.header-buttons .icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.header-buttons .icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: #667eea;
}

/* ===============================
   USER MENU DROPDOWN
=============================== */
.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.user-name {
    font-weight: 600;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}







/* منوی بازشو */
.user-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    padding: 8px 0;
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    min-width: 180px;
}


/* کلاس فعال‌ساز */
.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


.dropdown-item i {
    width: 20px;
    text-align: center;
    color: #666;
}


/* حالت هاور */
.dropdown-item:hover {
    background-color: #0d4f90;
    color: #000 !important;
}


.dropdown-item.logout {
    color: #dc3545;
}

.dropdown-item.logout:hover {
    background: #fff5f5;
    color: #dc3545;
}



/* Responsive */
@media (max-width: 768px) {
    .header-buttons .btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .header-buttons .icon-btn {
        width: 35px;
        height: 35px;
    }
    
    .user-menu-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .user-name {
        max-width: 120px;
    }
}


#userDropdown {
    display: none;
}
#userDropdown.show {
    display: block;
}