@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

html {
  height: 100%;
}

body.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: linear-gradient(160deg, #e7f6fa 0%, #f7fbfd 55%, #eef7f9 100%);
  overflow-x: hidden;
}

.wrapper {
  position: relative;
  width: min(750px, 100%);
  height: 450px;
  max-height: calc(100dvh - 32px);
  background: #fff;
  border: 2px solid #1494ad;
  box-shadow: 0 12px 40px rgba(20, 148, 173, 0.18);
  overflow: hidden;
  border-radius: 12px;
  flex-shrink: 0;
}

.wrapper .form-box {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wrapper .form-box.login {
  left: 0;
  padding: 0 48px 0 40px;
}

.wrapper .form-box.login .animation {
  transform: translateX(0);
  opacity: 1;
  filter: blur(0);
  transition: 0.7s ease;
  transition-delay: calc(0.1s * var(--j));
}

.form-box h2 {
  font-size: 32px;
  color: #0d7388;
  text-align: center;
}

.form-box form {
  width: 100%;
}

.form-box .input-box {
  position: relative;
  width: 100%;
  height: 50px;
  margin: 25px 0;
}

.input-box input {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  border-bottom: 2px solid #9cbcc4;
  padding-right: 23px;
  font-size: 16px;
  color: #1c3a45;
  font-weight: 500;
  transition: 0.5s;
}

.input-box input:focus,
.input-box input:valid {
  border-bottom-color: #1494ad;
}

.input-box label {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  font-size: 16px;
  color: #5b7a84;
  pointer-events: none;
  transition: 0.5s;
}

.input-box input:focus ~ label,
.input-box input:valid ~ label {
  top: -5px;
  color: #1494ad;
}

.input-box i {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 0;
  color: #7aa0aa;
  font-size: 18px;
  transition: 0.5s;
}

.input-box input:focus ~ i,
.input-box input:valid ~ i {
  color: #1494ad;
}

.login-error {
  color: #c0392b;
  font-size: 13px;
  text-align: center;
  min-height: 1.2em;
  margin-top: 4px;
}

.btn-login {
  position: relative;
  width: 100%;
  height: 45px;
  background: #1494ad;
  border: 2px solid #1494ad;
  outline: none;
  border-radius: 40px;
  cursor: pointer;
  font-size: 16px;
  color: #fff;
  font-weight: 600;
  z-index: 1;
  overflow: hidden;
}

.btn-login::before {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 300%;
  background: linear-gradient(#1494ad, #7ad3e6, #1494ad, #7ad3e6);
  z-index: -1;
  transition: 0.5s;
}

.btn-login:hover::before {
  top: 0;
}

.form-box .logreg-link {
  font-size: 14.5px;
  color: #5b7a84;
  text-align: center;
  margin: 20px 0 10px;
}

.wrapper .info-text {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wrapper .info-text.login {
  right: 0;
  text-align: right;
  padding: 0 32px 32px 80px;
}

.wrapper .info-text.login .animation {
  transform: translateX(0);
  opacity: 1;
  filter: blur(0);
  transition: 0.7s ease;
  transition-delay: calc(0.1s * var(--j));
}

.info-text h2 {
  font-size: 36px;
  color: #fff;
  line-height: 1.3;
  text-transform: uppercase;
}

.info-text p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 18px;
  line-height: 1.4;
}

.wrapper .bg-animate {
  position: absolute;
  top: -4px;
  right: 0;
  width: 850px;
  height: 600px;
  background: linear-gradient(45deg, #0d7388, #4ec3d8);
  border-bottom: 3px solid #1494ad;
  transform: rotate(10deg) skewY(40deg);
  transform-origin: bottom right;
}

.wrapper .bg-animate2 {
  position: absolute;
  top: 100%;
  left: 250px;
  width: 850px;
  height: 700px;
  background: #fff;
  border-top: 3px solid #1494ad;
}

@media (max-width: 800px), (max-height: 560px) {
  body.login-page {
    align-items: center;
    justify-content: center;
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }

  .wrapper {
    display: flex;
    flex-direction: column;
    width: min(100%, 400px);
    height: auto;
    max-height: none;
    min-height: 0;
  }

  .wrapper .bg-animate,
  .wrapper .bg-animate2 {
    display: none;
  }

  .wrapper .info-text,
  .wrapper .info-text.login {
    position: relative;
    top: auto;
    right: auto;
    order: -1;
    width: 100%;
    height: auto;
    text-align: center;
    justify-content: center;
    padding: 28px 22px 22px;
    background: linear-gradient(135deg, #0d7388, #1494ad 55%, #4ec3d8);
  }

  .wrapper .form-box,
  .wrapper .form-box.login {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    height: auto;
    padding: 28px 24px 24px;
  }

  .form-box h2 {
    font-size: 28px;
  }

  .info-text h2 {
    font-size: 26px;
    line-height: 1.2;
  }

  .info-text p {
    font-size: 15px;
    margin-top: 6px;
  }

  .form-box .input-box {
    margin: 20px 0;
  }

  .form-box .logreg-link {
    margin: 16px 0 0;
  }
}

@media (max-height: 500px) {
  body.login-page {
    align-items: flex-start;
    overflow-y: auto;
  }

  .wrapper .info-text.login {
    padding: 16px 20px;
  }

  .wrapper .form-box.login {
    padding: 16px 20px 18px;
  }

  .form-box .input-box {
    margin: 14px 0;
    height: 42px;
  }
}
