Edge plasma structure and power balance in tokamaks