/* هدر اصلی - چسبیده به بالا */
.mpda-main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: white;
    z-index: 100001;
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    height: 70px;
}

/* لوگو */
.header-brand {
    display: flex;
    align-items: center;
    gap: 25px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 20px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
}

.logo:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.2);
}

.logo i {
    font-size: 32px;
    color: #3b82f6;
}

.brand-name {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.status-text {
    font-size: 14px;
    color: #94a3b8;
    font-weight: 600;
}

/* بخش وسط */
.header-center {
    display: flex;
    align-items: center;
    gap: 40px;
}

/* منوی PSP */
.psp-selector {
    position: relative;
}

.psp-toggle {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    padding: 12px 22px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 180px;
    backdrop-filter: blur(10px);
}

.psp-toggle:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.psp-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100002;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    overflow: hidden;
}

.psp-selector:hover .psp-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.psp-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 14px;
}

.psp-item:last-child {
    border-bottom: none;
}

.psp-item:hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.2) 0%, transparent 100%);
    color: white;
    padding-right: 25px;
}

.psp-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

/* پروفایل کاربر */
.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 20px;
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

.user-profile:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.user-avatar i {
    font-size: 36px;
    background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 15px;
    font-weight: 700;
    color: white;
}

.user-role {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 600;
}

/* اقدامات هدر */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    padding: 12px 18px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(10px);
}

.header-btn:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.header-btn .badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    min-width: 22px;
    text-align: center;
    font-weight: 800;
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.4);
}

.logout-btn {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.1) 100%);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.logout-btn:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3) 0%, rgba(220, 38, 38, 0.2) 100%);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fca5a5;
}

/* Breadcrumb */
.header-breadcrumb {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 6px 12px;
    border-radius: 8px;
}

.breadcrumb-item:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

.breadcrumb-item.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, transparent 100%);
    color: white;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.breadcrumb-separator {
    color: #64748b;
    font-size: 12px;
}

.current-time {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #94a3b8;
    font-weight: 600;
    background: rgba(255,255,255,0.05);
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
}

@keyframes pulse {
    0% { 
        opacity: 1; 
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% { 
        opacity: 0.7; 
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }
    100% { 
        opacity: 1; 
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}