.login-box {
  display: flex;
}

/* Layout container */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, rgba(58,40,103,0.06), rgba(0,136,138,0.02));
}

.login-container {
  display: flex;
  gap: 0; /* no gap for a clean cut */
  max-width: none;
  width: 100%;
  height: 100vh - 40px;
  align-items: stretch;
}

.login-left {
  flex: 0 0 70%;
  min-width: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-right {
  flex: 0 0 30%;
  min-width: 320px;
  display: flex;
  align-items: center;
  justify-content: flex-start; /* form on the left inside the white panel */
  background: #fff; /* white background for right area */
  border-radius: 0; /* remove rounded corners */
  box-shadow: none; /* remove contour/shadow for clean cut */
}

:root {
  /* Palette estratta da Palettedicolori.pdf */
  --color-dark: #1D2120; /* scuro */
  --color-indigo: #3A2867; /* indaco */
  --color-primary: #00008D; /* blu profondo */
  --color-accent: #A7DC66; /* verde accent */
  --color-muted: #1D931D; /* grigio/verde chiaro */
  --color-light: #FA20FB; /* fondo chiaro (quasi bianco dal PDF) */
}

#login-logo {
  width: 100%;
  padding: 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media screen and (max-width: 640px) {
  .login-box {
    flex-direction: column-reverse;
  }
  
  #login-logo {
    width: 100%;
    padding: 20px;
  }
}

/* Make logo dominant on the left (occupies ~80% of left width) */
#login-logo img {
  width: 80%;
  max-width: none;
  height: auto;
  display: block;
  margin: 0 auto;
}


@media screen and (max-width: 1200px) {
  #login-logo img { width: 75%; }
  .login-left { padding-left: 4%; }
}

@media screen and (max-width: 900px) {
  .login-container { flex-direction: column; height: auto; padding: 20px 12px; }
  .login-left, .login-right { width: 100%; padding: 6px 12px; }
  #login-logo img { width: 60%; margin: 0 auto; display:block; }
  .login-right { background: transparent; box-shadow: none; border-radius: 0; padding-left: 0; }
  .login-card { max-width: 720px; background: #fff; box-shadow: 0 12px 36px rgba(29,33,32,0.08); border-radius:12px; }
}


#login-form {
  display: block;
  width: 100%;
  margin: 0 auto;
  text-align: left;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: transparent; /* the right column provides the white background */
  padding: 28px 30px;
  border-radius: 8px;
  box-shadow: none;
}

.login-card .lead {
  margin-top: 4px;
  margin-bottom: 18px;
  color: rgba(29,33,32,0.6);
}

.login-card .login-title {
  margin: 0 0 4px 0;
  color: var(--color-dark);
  font-weight: 700;
  font-size: 1.25rem;
}

.login-card form {
  display:block;
  width: 100%;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.input-row .login-tip {
  height: 40px;
  width: 48px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(0,136,138,0.06), rgba(58,40,103,0.03));
  color: var(--color-primary);
}

.login-card input[type="text"], .login-card input[type="password"] {
  flex: 1 1 auto;
  height: 44px;
  padding: 8px 12px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 8px;
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease, transform .08s ease;
}

.login-card input[type="text"]:focus, .login-card input[type="password"]:focus {
  box-shadow: 0 8px 20px rgba(58,40,103,0.06);
  border-color: var(--color-primary);
}

.login-box input[type="password"] {
  margin-bottom: 0;
  vertical-align: bottom;
}

.login-box .remember-login {
  margin: 8px 15px 20px 0;
}

.login-box .remember-login input {
  height: 25px;
  vertical-align: middle;
  margin: 0 5px;
  padding: 0;
}

.login-box .remember-login label {
  height: 25px;
  line-height: 250px;
}
  
.login-box .left-text {
  text-align: left;
}

.form-actions {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  margin-top: 12px;
}

.login-card .btn-primary {
  background: linear-gradient(90deg, var(--color-primary), var(--color-indigo));
  border: none;
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0,8,141,0.18);
}

.login-card .btn-primary:hover {
  background: linear-gradient(90deg, var(--color-indigo), var(--color-primary));
  transform: translateY(-1px);
}

.recovery-link {
  font-size: 0.95rem;
  color: var(--color-primary);
  text-decoration: none;
}
.recovery-link:hover { text-decoration: underline; }

.login-box h5 {
  color: rgba(29,33,32,0.7);
}

.login-failed-modal .modal-title .fa {
  color: red;
  font-size: 1.5em;
  vertical-align: bottom;
}

.login-recovery-modal .modal-title .fa {
  color: #5aa02c;
  font-size: 1.5em;
  vertical-align: bottom;
}
