There are many, many rail-rail I/O op amps out there
as commercial piece-parts. If you need both ends to be
at- (or over-) rail, you may end up with two follower-
buffered diff pairs (one N, one P) so that when one is
cut off the other is still working. Then the trick is in how
to cleanly combine the two, across the CM range.
Check out all the low voltage CMOS op amps from
Linear Tech, National, ADI and you may be able to
find a decent input stage concept schematic. Also the
IEEE JSSC pubs have had many such circuits shown,
over the years.