:root {
  color-scheme: light;
  --violet-900: #2c1a4d;
  --violet-700: #4a2f81;
  --violet-500: #593c96;
  --lavender-50: #f5f2ff;
  --lavender-100: #ebe5ff;
  --gray-400: #9487b6;
  --white: #ffffff;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Baloo 2', cursive;
  background-color: var(--white);
  color: var(--violet-900);
}

#app,
.login-page {
  min-height: 100vh;
}

#app {
  display: flex;
}

.login-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 64px;
}

.login-wrapper {
  width: min(1140px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 560px);
  gap: 96px;
  align-items: center;
}

.login-left {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  font-weight: 700;
  font-size: 1.6rem;
}

#main-logo {
  width: 48px;
  height: 48px;
}

.welcome-copy {
  display: grid;
  gap: 12px;
}

.login-heading {
  margin: 0;
  font-size: clamp(2.2rem, 3.5vw, 2.9rem);
  line-height: 1.08;
}

.login-subheading {
  margin: 0;
  color: rgba(58, 45, 90, 0.65);
  font-size: clamp(1.02rem, 1.15vw, 1.08rem);
  line-height: 1.5;
  max-width: 340px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  max-width: 360px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-weight: 600;
  font-size: 0.95rem;
}

.form-control {
  border: 1.4px solid rgba(64, 34, 110, 0.35);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--violet-900);
  background-color: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control::placeholder {
  color: rgba(106, 93, 132, 0.6);
}

.form-control:focus {
  outline: none;
  border-color: var(--violet-500);
  box-shadow: 0 0 0 3px rgba(95, 74, 165, 0.12);
}

.password-field {
  position: relative;
}

.password-field .form-control {
  width: 100%;
  padding-right: 56px;
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(76, 48, 120, 0.12)
    url("data:image/svg+xml,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23523c69' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-7 11-7 11 7 11 7-4 7-11 7-11-7-11-7Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center/18px
    no-repeat;
  cursor: pointer;
  transition: background-color 0.2s ease, background-image 0.2s ease;
}

.toggle-password:hover {
  background-color: rgba(76, 48, 120, 0.22);
}

.toggle-password.is-active {
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%23523c69' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.78 10.78 0 0 1 12 19c-7 0-11-7-11-7a20.27 20.27 0 0 1 5.06-5.94M9.53 9.53A3.5 3.5 0 0 0 8.5 12a3.5 3.5 0 0 0 3.5 3.5 3.5 3.5 0 0 0 2.47-.97M1 1l22 22'/%3E%3C/svg%3E");
}

.form-links {
  display: flex;
  justify-content: flex-start;
  font-size: 0.95rem;
}

.forgot-link {
  color: var(--violet-500);
  text-decoration: none;
}

.forgot-link:hover {
  text-decoration: underline;
}

#submit-button {
  width: 100%;
  padding: 16px 18px;
  border-radius: 12px;
  background-color: var(--violet-900);
  border: none;
  font-weight: 600;
  font-size: 1.05rem;
  transition: background-color 0.2s ease;
}

#submit-button:hover,
#submit-button:focus {
  background-color: #1f1037;
}

.register-copy {
  margin: 0;
  text-align: left;
  font-size: 0.95rem;
  color: rgba(62, 43, 97, 0.8);
}

.register-copy a {
  color: var(--violet-500);
  font-weight: 600;
  text-decoration: none;
}

.register-copy a:hover {
  text-decoration: underline;
}

.login-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.image-frame {
  width: 100%;
  max-width: 520px;
  height: 100%;
  background: transparent;
  padding: 0;
  border-radius: 24px;
  box-shadow: none;
  overflow: hidden;
}

.image-frame picture {
  display: block;
  width: 100%;
  height: 100%;
}

.login-hero-image {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 24px;
  object-fit: cover;
}

@media (max-width: 1024px) {
  .login-wrapper {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .login-left {
    align-items: center;
    text-align: center;
  }

  .login-form {
    width: 100%;
  }

  .form-links,
  .register-copy {
    text-align: center;
    justify-content: center;
  }

  .login-right {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .login-page {
    padding: 48px 24px;
  }

  .brand {
    width: 100%;
    justify-content: center;
    font-size: 1.35rem;
  }

  .login-right {
    order: -1;
  }

  .image-frame {
    margin: 0 auto 16px;
    max-width: 360px;
    height: 220px;
    border-radius: 22px;
  }

  .login-heading {
    text-align: center;
    font-size: 2.1rem;
  }

  .login-subheading {
    max-width: none;
    text-align: center;
  }

  .login-form {
    width: 100%;
    gap: 20px;
  }

  .form-control {
    padding: 14px 16px;
  }

  .form-links,
  .register-copy {
    text-align: center;
  }

  .login-hero-image {
    object-position: center top;
  }
}

@media (max-width: 420px) {
  .login-page {
    padding: 36px 18px 44px;
  }

  .image-frame {
    max-width: 320px;
    height: 200px;
  }

  .toggle-password {
    right: 12px;
  }
}
