/* Login page: two-column layout and form styles */
.login-wrap {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background-image: url("../img/login/fondo-web.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

/* Capa oscura sobre el fondo para que el contenido siga legible */
.login-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
}

.login-wrap > * {
  position: relative;
  z-index: 1;
}

.login-left {
  flex: 0 0 50%;
  max-width: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background-color: var(--body-bg-rgb, #f9fafc);
}

.login-left-inner {
  width: 100%;
  max-width: 420px;
}

.login-left-inner .card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card-form {
  width: 100%;
}

.form-heading {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--default-text-color, #1a1a1a);
}

.login-form .form-group {
  margin-bottom: 1rem;
}

.login-form .form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--default-text-color, #1a1a1a);
}

.form-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--default-border, #e5e7eb);
  border-radius: 0.375rem;
  font-size: 1rem;
}

.form-input:focus {
  outline: none;
  border-color: rgb(var(--primary-rgb, 92, 103, 247));
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 92, 103, 247), 0.15);
}

.form-error {
  display: block;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.input-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-password-wrap .form-input {
  padding-inline-end: 2.5rem;
}

.btn-toggle-password {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0.25rem;
  color: #6b7280;
  cursor: pointer;
  line-height: 1;
}

.btn-toggle-password:hover {
  color: var(--default-text-color, #1a1a1a);
}

.btn-outlook {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--default-border, #e5e7eb);
  border-radius: 0.375rem;
  background-color: #f9fafb;
  color: #6b7280;
  font-size: 0.875rem;
  cursor: not-allowed;
  opacity: 0.8;
}

.btn-submit {
  width: 100%;
  padding: 0.65rem 1rem;
  margin-bottom: 0.5rem;
  border: none;
  border-radius: 0.375rem;
  background-color: rgb(var(--primary-rgb, 92, 103, 247));
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.2s;
}

.btn-submit:hover:not(:disabled) {
  background-color: rgba(var(--primary-rgb, 92, 103, 247), 0.9);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.login-error {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #b91c1c;
  background-color: #fef2f2;
  border-radius: 0.375rem;
  border: 1px solid #fecaca;
}

.brand-block-footer {
  margin-top: 1.5rem;
  text-align: center;
}

.brand-block-footer img {
  max-height: 80px;
  width: auto;
}

/* Columna derecha: bienvenida */
.login-right {
  flex: 0 0 50%;
  max-width: 50%;
  padding: 2rem;
  color: #fff;
}

.welcome-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #fff;
}

.welcome-text {
  font-size: 1rem;
  line-height: 1.6;
  max-width: 360px;
  margin: 0 auto;
  opacity: 0.95;
}

.login-right-content {
  padding: 1rem 0;
}

/* Responsive: una columna en pantallas pequeñas */
@media (max-width: 991.98px) {
  .login-wrap {
    flex-direction: column;
  }

  .login-left,
  .login-right {
    flex: 1 1 auto;
    max-width: 100%;
    min-height: auto;
  }

  .login-right {
    order: -1;
    padding: 1.5rem;
  }

  .login-right .h-50 {
    height: auto !important;
  }

  .login-right-content {
    padding: 1rem 0;
  }
}
