html,
body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  margin: 0;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f5f5f5;
}

.login {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.left-section {
  flex: 1;
  text-align: center;
  background-color: #e7eded;
  border-top-right-radius: 50px;
  border-bottom-right-radius: 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
}

.left-section .title {
  font-size: 45px;
  color: var(--color-secondary);
  font-weight: 600;
  padding-bottom: 40px;
  text-align: left;
}

.left-section svg {
  width: 100%;
  max-width: 450px;
  height: auto;
}

.right-section {
  flex: 1;
  background: var(--color-white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.login-form {
  max-width: 360px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.login-heading {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 20px;
  text-align: left;
}

.login-form .form-group {
  margin-bottom: 20px;
}

.login-form label {
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
  font-size: 14px;
  color: var(--color-text);
}

.login-form .required {
  color: red;
}

.login-form input {
  width: 100%;
  padding: 15px 12px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
}

.login-form .password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.login-form .password-wrapper input {
  padding-right: 40px;
  flex: 1;
}

.login-form .toggle-icon {
  position: absolute;
  right: 10px;
  color: #666;
  cursor: pointer;
  width: auto;
  padding: 4px;
  margin-top: 0;
  background: none;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.login-form .toggle-icon:hover {
  background: rgba(0, 0, 0, 0.06);
}

.login-form .toggle-icon:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 2px;
}

.login-form .form-error {
  color: red;
  font-size: 12px;
  margin-top: 4px;
  display: none;
}

.login-form .form-error.is-visible {
  display: block;
}

.login-form .server-error {
  color: red;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

.login-form .server-error.is-visible {
  display: block;
}

.login-form button[type='submit'] {
  width: 100%;
  padding: 15px;
  background-color: var(--color-brand);
  color: var(--color-white);
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  margin-top: 4px;
  cursor: pointer;
}

.login-form button[type='submit']:hover {
  background-color: var(--color-brand);
}

.login-form button[type='submit']:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: #daaea380;
}

.button-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-top-color: var(--color-white);
  border-radius: 50%;
  animation: login-spinner-spin 0.7s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation: none;
  }
}

@keyframes login-spinner-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  html,
  body {
    overflow: auto;
  }

  .login {
    flex-direction: column;
    padding: 20px;
    gap: 30px;
    height: auto;
  }

  .left-section,
  .right-section {
    border-radius: 12px;
    flex: unset;
  }

  .left-section svg {
    max-width: 300px;
  }

  .login-heading {
    font-size: 24px;
  }
}
