Kaepernick lifts 49ers over Panthers 23-10