label.styled {
  position: absolute;
  top: 20px;
  color: grey;
  font-size: 14px;
  cursor: text;
  transition: .25s ease;
  font-weight: 100;
}

input.styled {
  display: block;
  width: 100%;
  margin-top: 15px;
  border: none;
  border-radius: 0;
  transition: .3s ease;
  background: transparent;
}
input.styled:valid ~ label {
  top: 5px;
  font-size: 10px;
  color: #a94442;
}
input.styled:focus {
  outline: none;
}
input.styled:focus ~ label {
  top: 5px;
  font-size: 10px;
  color: #a94442;
}
input.styled:focus ~ .bar:before {
  transform: translateX(0);
}
input.styled:-webkit-autofill {
  -webkit-box-shadow: 0 0 0px 1000px white inset;
  -webkit-text-fill-color: black !important;
}

.input {
  margin: 10px 0;
  overflow: hidden;
  position: relative;
}

.input >.bar {
  background: #a94442;
  content: '';
  width: 100%;
  height: 1px;
  transition: .3s ease;
  position: relative;
}

.input >.bar:before {
  content: '';
  position: absolute;
  width: 100%;
  height: 1px;
  background: #a94442;
  transform: translateX(-100%);
}