:root {
  --primary-color: 0, 143, 33;
  --error-color: 158, 0, 0;
  --dark-color: 17, 17, 17;
}

@keyframes spinner {
  0% {
    transform: rotateZ(0deg);
  }
  100% {
    transform: rotateZ(359deg);
  }
}
* {
  box-sizing: border-box;
}

body {
	font-family: Consolas;
	margin: 0;
	padding: 0;
	background-color: rgb(var(--dark-color));
}
.wrapper {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  min-height: 100%;
  padding: 0px;
  background: rgba(var(--primary-color), 0.1);
}

.login {
  border-radius: 2px 2px 5px 5px;
  padding: 10px 20px 20px 20px;
  width: 90%;
  max-width: 320px;
  background: rgb(var(--dark-color));
  position: relative;
  padding-bottom: 80px;
  box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.3);
}
.login.loading button {
  max-height: 100%;
  padding-top: 50px;
  cursor: pointer;
}
.login.loading button .spinner {
  opacity: 1;
  top: 40%;
}

.login.ok button {
  background-color: rgb(var(--primary-color));
}
.login.ok button .spinner {
  border-radius: 0;
  border-top-color: transparent;
  border-right-color: transparent;
  height: 20px;
  animation: none;
  transform: rotateZ(-45deg);
}
.login.err button {
  background-color: rgb(var(--error-color));
}
.login.err button .spinner {
  border-radius: 0;
  border-top-color: transparent;
  border-right-color: transparent;
  border-left-color: transparent;
  height: 20px;
  width: 60px;
  left: 45%;
  animation: none;
  transform: rotateZ(-45deg);
}
.login button .spinner:after {
    content: "";
    display: block;
    border: 4px solid #fff;
    border-left-color: transparent;
    border-top-color: transparent;
    border-right-color: transparent;
    border-bottom-color: transparent;
    height: 20px;
    margin-left: 5px;
    width: 0px;
    animation: none;
    transform: rotateZ(90deg);
	transition: all .3s ease;
}
.login.err button .spinner:after {
    border-bottom-color: #fff;
    width: 56px;
}

.login input {
	font-family: Consolas;
  display: block;
  padding: 15px 10px;
  margin-bottom: 10px;
  width: 100%;
  border: 1px solid rgba(var(--primary-color), 0.5);
  background: rgb(var(--dark-color));
  transition: border-width 0.2s ease;
  border-radius: 2px;
  color: #ffffff;
}
.login input:focus {
	font-family: Consolas;
  outline: none;
  color: #444;
  border-color: rgb(var(--primary-color));
  border-left-width: 35px;
}
.login a {
  font-size: 0.8em;
  color: rgb(var(--primary-color));
  text-decoration: none;
}
.login .title {
  color: #ffffff;
  font-size: 1.2em;
  font-weight: bold;
  margin: 10px 0 30px 0;
  text-align: center;
}
.login button {
  width: 100%;
  height: 100%;
  padding: 10px 10px;
  background: rgba(var(--primary-color), 0.5);
  color: #fff;
  display: block;
  border: none;
  margin-top: 20px;
  position: absolute;
  left: 0;
  bottom: 0;
  max-height: 60px;
  border: 0px solid rgba(0, 0, 0, 0.1);
  border-radius: 0 0 2px 2px;
  transform: rotateZ(0deg);
  transition: all 0.3s ease-out;
  border-bottom-width: 7px;
}
.login button .spinner {
  display: block;
  width: 40px;
  height: 40px;
  position: absolute;
  border: 4px solid #ffffff;
  border-top-color: rgba(255, 255, 255, 0.3);
  border-radius: 100%;
  left: 50%;
  top: 0;
  opacity: 0;
  margin-left: -20px;
  margin-top: -20px;
  animation: spinner 0.6s infinite linear;
  transition: top 0.3s 0.3s ease, opacity 0.3s 0.3s ease, border-radius 0.3s ease;
  box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.2);
}
.login:not(.loading) button:hover,
.login:not(.loading) button:focus {
	cursor: pointer;
	background: rgba(var(--primary-color), 0.8);
}

footer {
  display: block;
  padding-top: 50px;
  text-align: center;
  color: #ddd;
  font-weight: normal;
  text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.2);
  font-size: 0.8em;
}
footer a, footer a:link {
  color: #fff;
  text-decoration: none;
}



.login input:focus + i.fa {
    opacity: 1;
    left: 26px;
    transition: all 0.25s ease-out;
}
.login input + i.fa {
    color: #fff;
    font-size: 1em;
    position: absolute;
    margin-top: -45px;
    opacity: 0;
    left: 0;
    transition: all 0.1s ease-in;
}
.fa-user {
    display: inline-block;
    width: 1.4em;
    height: 1.4em;
    background-image: url(svg/user.svg);
    background-size: contain;
    background-repeat: no-repeat;
}
.fa-key {
    display: inline-block;
    width: 1.4em;
    height: 1.4em;
    background-image: url(svg/key.svg);
    background-size: contain;
    background-repeat: no-repeat;
}

.state {
	font-family: Consolas;
}