/* Login FLUS: superficie operativa, compacta y accesible. */

.page-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  color: var(--text, #eef2ff);
  background:
    radial-gradient(circle at 20% 5%, rgba(124, 58, 237, 0.24), transparent 36%),
    radial-gradient(circle at 85% 82%, rgba(168, 85, 247, 0.16), transparent 38%),
    #0b0715;
}

.login-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 32px 36px 28px;
  color: var(--text, #eef2ff);
  background: var(--panel, #171127);
  border: 1px solid transparent;
  border-radius: 16px;
}

.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.login-brand {
  display: flex;
  position: relative;
  isolation: isolate;
  width: 150px;
  align-items: center;
  justify-content: center;
}

.login-brand::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 46%;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.22), transparent 68%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.page-login .login-logo .logo-sistema {
  display: block;
  width: 108px;
  height: 145px;
  max-width: 100%;
  margin: 0;
  object-fit: contain;
}

.login-title {
  margin: 0;
  color: var(--text-strong, #fff);
  font-size: clamp(1.55rem, 4vw, 1.75rem);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-align: center;
  text-wrap: balance;
}

.login-subtitle {
  max-width: 34ch;
  margin: 9px auto 24px;
  color: var(--muted, #aeb5c4);
  font-size: 0.94rem;
  line-height: 1.5;
  text-align: center;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: left;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-form label {
  color: #c8c4d4;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.3;
}

.login-form input[type="text"],
.login-form input[type="password"] {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 12px;
  outline: 0;
  background: rgba(15, 23, 42, 0.82);
  color: var(--text, #eef2ff);
  font: inherit;
  font-size: 16px;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.login-form input:hover {
  border-color: rgba(196, 181, 253, 0.48);
}

.login-form input:focus-visible {
  border-color: #a78bfa;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
  background: rgba(19, 27, 49, 0.96);
}

.login-btn {
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  margin: 4px 0 0;
  padding: 11px 20px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  transition: filter 0.16s ease, transform 0.16s ease;
}

.page-login .login-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.page-login .login-btn:active {
  filter: brightness(0.98);
  transform: translateY(0);
}

.page-login .login-btn:disabled {
  cursor: not-allowed;
  filter: saturate(0.5);
  opacity: 0.62;
  transform: none;
}

.login-error {
  margin: 18px 0 20px;
  padding: 11px 13px;
  border: 1px solid rgba(248, 113, 113, 0.68);
  border-radius: 12px;
  background: rgba(127, 29, 29, 0.68);
  color: #fee2e2;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.4;
}

.login-error.fade-out {
  display: none;
}

.caps-warning {
  margin: 0;
  color: #fca5a5;
  font-size: 0.82rem;
  line-height: 1.35;
}

.login-version {
  display: flex;
  margin-top: 22px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted, #9ca3af);
  font-size: 0.76rem;
  line-height: 1.35;
  text-align: center;
}

.login-brand-copy,
.login-brand-name,
.login-brand-edition {
  display: none !important;
}

@media (max-width: 480px) {
  .page-login {
    align-items: center;
    padding: max(20px, env(safe-area-inset-top)) 14px max(20px, env(safe-area-inset-bottom));
  }

  .login-card {
    max-width: 390px;
    padding: 26px 20px 22px;
  }

  .login-logo {
    margin-bottom: 14px;
  }

  .login-brand {
    width: 132px;
  }

  .page-login .login-logo .logo-sistema {
    width: 96px;
    height: 129px;
  }

  .login-subtitle {
    margin-bottom: 22px;
  }
}

@media (max-height: 700px) {
  .page-login {
    align-items: flex-start;
    padding-top: 18px;
  }

  .page-login .login-logo .logo-sistema {
    width: 82px;
    height: 110px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-btn,
  .login-form input {
    transition: none;
  }
}
