More than enough time. PTY is a garbage airport as far as amenities, the traffic getting in and out is awful too, the prices for food aren't good either. However...what it's great for, connections.
No customs clearance is a beautiful thing. The only caveat is when flying to the USA, you have a little bit of extra screening at the gate (Europe too?) where they make you remove your shoes, liquids, check your bag etc. But it's really nothing significant.
Matter of fact, on both directions, if on time, you can probably pop into the lounge (also nothing amazing, but better than the terminal) for a drink or a quick wifi sesh.