CSS/form input with width: 100% goes outside parent’s bound

There is a pretty simple solution for this problem:

(Method of specifying whether or not an element’s borders and padding should be included in size units)