If Pakistan had played aggressively from the 20th over then maybe Pakistan could have scored more than 300 runs. A target of 282 runs is not a tough target on the batting pitch in Chennai. If Afghanistan's opening pair does not succeed in breaking today's match, Pakistan will not have a chance to win.
They could have gotten close to 300 had Iftikar Ahmed not gotten out leaving 4 balls, in last over Pakistan scored mere 3 runs, with he being there Pak could have had 10-20 runs, and Shadab also would not have worry about keeping strike.
Regarding Afghanistan openers you are right, whenever they perform well, Afghans wins the match.
Afghanistan's performance is truly commendable. This is the first time they beat Pakistan that too in the World Cup. Afghanistan also beat England in this World Cup but only lost to Bangladesh which was really unimaginable. Afghanistan have been able to defeat top teams like Pakistan and England which is the most valuable gift for Afghanistan in this World Cup.
In yesterday's match, Pakistan's runs were very short due to some bad decisions. Normally a match is not competitive if the score is below 300 runs on the batting pitch but if Pakistan could have scored as many runs in the end as they did in the beginning then the score would have gone above 300 runs. But in terms of bowling, Pakistan was far behind Afghanistan. Haris Rauf and Shaheen Afridi in particular made it easy for Afghanistan to win because of a lot of bad bowling.
Pakistan won the first two matches and lost the remaining three matches, which led to their deterioration in the points table. To move to the best fourth place, Pakistan must win all the next matches which has become uncertain for Pakistan. Now, if Pakistan wants to move to the fourth position, there is nothing to do except wait for time to see if it can win the next matches.