
html{
  overflow-x: hidden;
}
body.login {
  overflow: hidden;
  background-color: #f5f7fa;
  margin: 0;
  padding: 0;
}

h1 {
  font-size: 24px !important;
  font-weight: 500;
  color: var(--primary);
}

.login-content {
  display: flex;
  align-items: flex-start;
  height: 100vh;
}

.left-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 0 0;
  height: 100%;
  position: relative;
  z-index: 1;
  justify-content: space-between;
  padding-bottom: 50px;
}

.login-wrapper {
  justify-content: center;
  align-items: left;
  min-width: 400px;
  padding: var(--paddingXL, --paddingXL);
  background-color: white;
  border-radius: var(--borderM, 12px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.login-wrapper:hover {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.login-wrapper.logo {
  background-color: transparent;
  box-shadow: none;
  display: flex;
  justify-content: center;
}

.right-container {
  flex: 1 0 0;
  height: 100%;
  transition: transform 0.5s ease;
  padding: var(--paddingL, 20px);
}

.right-content{
  width: 100%;
  height: 100%;
  background-image: url("../img/login.webp");
  /* background: hsla(198, 100%, 45%, 1);
  background: linear-gradient(0deg, hsla(198, 100%, 45%, 1) 0%, hsla(186, 100%, 98%, 1) 100%); */
  background-size: cover;
  border-radius: var(--borderM, 12px);
  background-color: var(--bg-blue);
}

.login-logo {
  position: absolute;
  left: 20px;
  top: 20px;
  z-index: 10;
  transition: transform 0.3s ease;
}

.login-logo:hover {
  transform: scale(1.05);
}

.form-container-login form {
  display: flex;
  flex-direction: column;
  gap: var(--paddingL, 20px);
}

.form-fields-login {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.login-input, .normal-input {
  padding: 14px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
  transition: all 0.2s ease;
  background-color: #f9fafc;
}

.login-input:focus, .normal-input:focus {
  outline: none;
  border-color: var(--primary, #217DC2);
  box-shadow: 0 0 0 3px rgba(33, 125, 194, 0.15);
  background-color: white;
}

.login-input-error, .normal-input-error {
  padding: 14px 16px;
  border: 1px solid #e53e3e;
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
  background-color: #fff5f5;
}

.login-input-error:focus, .normal-input-error:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.15);
}

.password-wrap {
  position: relative;
  width: 100%;
}

.password-toggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.password-toggle:hover {
  opacity: 1;
}

.login-btn {
  background-color: var(--primary, #217DC2);
  color: white;
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px rgba(33, 125, 194, 0.2);
}

.login-btn:hover {
  background-color: var(--primary-dark, #1a63a0);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(33, 125, 194, 0.25);
}

.login-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(33, 125, 194, 0.2);
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background-color: white;
  color: #333;
  border: 1px solid #e0e0e0;
  padding: 12px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.google-btn:hover {
  background-color: #f5f5f5;
  border-color: #d0d0d0;
}

.forgotpass {
  text-align: right;
  font-size: 0.9rem;
  color: var(--primary, #217DC2);
  margin-top: -5px;
  transition: all 0.2s ease;
}

.forgotpass:hover {
  color: var(--primary-dark, #1a63a0);
}


@keyframes progress {
  0% { width: 100%; }
  100% { width: 0%; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-wrapper {
  animation: fadeIn 0.6s ease-out forwards;
}

.login-wrapper.logo {
  animation: fadeIn 0.4s ease-out forwards;
}

.alert {
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.alert-error {
  background-color: #fff5f5;
  border-left: 4px solid #e53e3e;
}

.mask {
  flex: 1 0 0;
  height: 100%;
  background-color: white;
  mask-repeat: no-repeat;
  mask-size: cover;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: cover;
  position: relative;
}

/* Animation for form elements */
.form-fields-login > * {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeIn 0.3s ease-out forwards;
}

.form-fields-login > *:nth-child(1) { animation-delay: 0.1s; }
.form-fields-login > *:nth-child(2) { animation-delay: 0.2s; }
.form-fields-login > *:nth-child(3) { animation-delay: 0.3s; }
.form-fields-login > *:nth-child(4) { animation-delay: 0.4s; }

@media (max-width: 1440px) {
  .login-wrapper {
   padding: 20px !important;
  }
  .form-container-login form {
    gap: 10px !important;
  }
  .alert {
    font-size: 0.825rem;
  }
  .login-input, .normal-input {
  font-size: 0.875rem;
  }
}

@media (max-width: 1366px) {
  .login-logo {
    display: none !important;
  }
  .right-container,
  .mask {
    display: none;
  }

  .left-container {
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    width: 100%;
  }
  
  /* .login-wrapper {
    background-color: rgba(255, 255, 255, 0.95) !important;
  } */

}

/* Miglioramento responsive per laptop e schermi piccoli */
@media (max-width: 1024px) {
  .left-container {
    padding-bottom: 20px;
  }

  .login-wrapper {
    min-width: 320px;
    padding: 18px;
  }
  .login-wrapper.logo {
    padding: 8px;
  }
  .form-fields-login {
    gap: 4px;
  }
  .form-container-login form {
    gap: 12px;
  }
  h2 {
    font-size: 44px !important;
  }
  .text-bodyXL {
    font-size: 1rem !important;
  }
  .forgotpass {
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {
  .left-container > div{
    width: 100%;
  }
  .left-container {
    padding: 10px;
    padding-bottom: 10px;
  }
  .login-wrapper {
    min-width: 220px;
    max-width: 98vw;
    padding: 10px;
  }

  .form-container-login form {
    gap: 8px;
  }
  .text-bodyXL {
    font-size: 0.95rem !important;
  }
  .forgotpass {
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  
  .left-container {
    width: 100%;
    padding: 20px;
  }
  
  .login-wrapper {
    /* background-color: rgba(255, 255, 255, 0.95) !important; */
    width: 100%;
    max-width: 450px;
    padding: 24px;
  }
  
  .login-wrapper.logo {
    padding: 15px;
  }
  
  .login-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  
  .login-content h1 {
    text-align: center;
    font-size: 1.5rem !important;
  }
  
  .form-container-login form {
    gap: 20px;
  }
  
  .login-logo {
    position: relative;
    left: auto;
    top: auto;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    width: 100%;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  body.login.dark-mode-enabled {
    background-color: #121212;
  }
  
  .dark-mode-enabled .login-wrapper {
    background-color: #1e1e1e;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  }
  
  .dark-mode-enabled h1 {
    color: #f0f0f0;
  }
  
  .dark-mode-enabled .label {
    color: #b0b0b0;
  }
  
  .dark-mode-enabled .login-input,
  .dark-mode-enabled .normal-input {
    background-color: #2d2d2d;
    border-color: #3d3d3d;
    color: #f0f0f0;
  }
  
  .dark-mode-enabled .login-input:focus,
  .dark-mode-enabled .normal-input:focus {
    background-color: #333;
    border-color: var(--primary, #217DC2);
  }
}
