form { display: flex; flex-direction: column; } .form-group { display: flex; flex-direction: column; } .form-group { margin: 0.66em 0; } .form-group:first-child { margin-top: 0; } .form-group:last-child { margin-bottom: 0; } .form-and-details { display: flex; } .form-and-details > * { max-width: 50%; width: 100%; } .form-and-details > *:first-child { margin-right: 1em; } .form-and-details > *:last-child { margin-left: 1em; } label { font-weight: 500; } input + label, input + input { margin-top: 2em; } input[type="password"], input[type="text"] { background: #fff; background-clip: padding-box; border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 6px; color: rgba(0, 0, 0, 0.8); display: block; margin: 0.5em 0.25em; padding: 0.5em 1em; line-height: 1.5; transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; font-family: sans-serif; } input[type="password"]:focus, input[type="text"]:focus { background-color: #fff; border-color: #80bdff; outline: 0; box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); } input[type="password"]:focus:invalid, input[type="text"]:focus:invalid { background-color: #fff; border-color: #ff8080; outline: 0; box-shadow: 0 0 0 0.2rem rgba(255, 0, 13, 0.25); } input[type="submit"] { background-color: rgb(21, 124, 214); border: rgb(2, 97, 180); border-radius: 6px; color: #fff; padding: 0.25em 0.5em; display: inline-block; font-weight: 400; text-align: center; white-space: nowrap; vertical-align: middle; user-select: none; border: 1px solid rgba(0, 0, 0, 0); font-size: 1rem; line-height: 1.5; transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; } input[type="submit"]:active { background-color: rgb(47, 123, 190); border-color: rgb(23, 78, 126); color: #ffffff; }