/* Login Nexx — mitad izquierda estilo Facebook móvil; logo a la derecha */

:root {
  --nexx-login-blue: #1877f2;
  --nexx-login-blue-hover: #166fe5;
  --nexx-login-blue-focus: #e7f3ff;
  --nexx-login-border: #dddfe2;
  --nexx-login-text: #1c1e21;
  --nexx-login-heading: #111112;
  --nexx-login-placeholder: #8a8d91;
  --nexx-login-pill: 50px;
  --nexx-login-form-max: 360px;
  /* Pila Meta/Facebook: Optimistic no es pública; en Windows cae en Segoe UI Historic */
  --nexx-login-font: Optimistic, 'Segoe UI Historic', 'Segoe UI', Helvetica, Arial, sans-serif;
}

body.nexx-login-page.login-page {
  margin: 0;
  min-height: 100vh;
  background: #ffffff;
  font-family: var(--nexx-login-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Pantalla partida: izquierda login, derecha marca */
.nexx-login-layout {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 100vh;
  width: 100%;
  margin: 0;
  padding: 0;
}

.nexx-login-form-side {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem;
  background: #ffffff;
  box-sizing: border-box;
}

.nexx-login-brand-side {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem;
  background: #f0f2f5;
  box-sizing: border-box;
}

.nexx-login-form-wrap {
  width: 100%;
  max-width: var(--nexx-login-form-max);
}

.nexx-login-brand-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 420px;
}

.nexx-login-card__title {
  margin: 0 0 1.25rem;
  font-family: var(--nexx-login-font);
  font-size: 17px;
  font-weight: 600;
  color: var(--nexx-login-heading);
  text-align: left;
  line-height: 1.2;
  letter-spacing: normal;
}

.nexx-login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Inputs y botón — forma de píldora */
.nexx-input {
  display: block;
  width: 100%;
  height: 50px;
  padding: 0 18px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  color: var(--nexx-login-text);
  background: #ffffff;
  border: 1px solid var(--nexx-login-border);
  border-radius: var(--nexx-login-pill);
  box-shadow: none;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.nexx-input::placeholder {
  color: var(--nexx-login-placeholder);
}

.nexx-input:focus {
  border-color: var(--nexx-login-blue);
  box-shadow: 0 0 0 2px var(--nexx-login-blue-focus);
}

.nexx-input-wrap--password {
  position: relative;
}

.nexx-input-wrap--password .nexx-input {
  padding-right: 50px;
}

.nexx-input__toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--nexx-login-placeholder);
  cursor: pointer;
}

.nexx-input__toggle:hover {
  color: var(--nexx-login-blue);
}

.nexx-input__eye[hidden] {
  display: none !important;
}

.nexx-login-submit {
  width: 100%;
  height: 48px;
  margin-top: 6px;
  padding: 0 18px;
  font-family: var(--nexx-login-font);
  font-size: 17px;
  font-weight: 600;
  color: #ffffff !important;
  background: var(--nexx-login-blue) !important;
  border: none !important;
  border-radius: var(--nexx-login-pill) !important;
  box-shadow: none !important;
  cursor: pointer;
}

.nexx-login-submit:hover {
  background: var(--nexx-login-blue-hover) !important;
}

.nexx-login-forgot {
  margin: 10px 0 0;
  text-align: center;
  font-size: 0.9375rem;
}

.nexx-login-forgot a {
  color: var(--nexx-login-blue);
  text-decoration: none;
  font-weight: 500;
}

.nexx-login-forgot a:hover {
  text-decoration: underline;
}

.nexx-login-text {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  color: var(--nexx-login-placeholder);
  line-height: 1.45;
}

.nexx-login-submit--link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
}

.nexx-login-alert {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  border-radius: 12px;
}

.nexx-login-alert--danger {
  color: #b91c1c;
  background: #fff5f5;
  border: 1px solid #fecaca;
}

/* Logo panel derecho */
.sistema-logo-principal--login {
  max-width: min(340px, 80%);
  max-height: 120px;
}

/* Tema oscuro */
html[data-bs-theme='dark'] body.nexx-login-page.login-page {
  background: #18191a;
}

html[data-bs-theme='dark'] .nexx-login-form-side {
  background: #18191a;
}

html[data-bs-theme='dark'] .nexx-login-brand-side {
  background: #242526;
}

html[data-bs-theme='dark'] {
  --nexx-login-border: #3e4042;
  --nexx-login-text: #e4e6eb;
  --nexx-login-heading: #e4e6eb;
  --nexx-login-placeholder: #b0b3b8;
  --nexx-login-blue-focus: rgba(24, 119, 242, 0.3);
}

html[data-bs-theme='dark'] .nexx-input {
  background: #3a3b3c;
  color: var(--nexx-login-text);
}

html[data-bs-theme='dark'] .nexx-login-card__title {
  color: var(--nexx-login-heading);
}

@media (max-width: 900px) {
  .nexx-login-layout {
    flex-direction: column;
  }

  .nexx-login-form-side,
  .nexx-login-brand-side {
    flex: 0 0 auto;
    width: 100%;
    min-height: auto;
  }

  .nexx-login-form-side {
    padding: 2rem 1.25rem 1.5rem;
    order: 1;
  }

  .nexx-login-brand-side {
    padding: 2rem 1.25rem 2.5rem;
    order: 2;
    background: #ffffff;
  }

  html[data-bs-theme='dark'] .nexx-login-brand-side {
    background: #18191a;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nexx-input,
  .nexx-login-submit,
  .nexx-input__toggle {
    transition: none;
  }
}
