/* MOSS — Login: único lugar con glassmorphism (blur) */

.login-body {
  margin: 0;
  min-height: 100dvh;
  background-color: #10150F;
  background-image: none; /* el fondo lo pone ::before (casemoss.webp) */
  background-attachment: fixed;
}

/* Login usa casemoss.webp (verde), no el fondo interno casemoss2 */
body.login-body::before {
  background-image: url('../brand/casemoss.webp');
  opacity: 1;
}

.login-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: transparent;
}

.login-glass {
  width: 100%;
  max-width: 360px;
  padding: 32px 24px 28px;
  border-radius: 20px;
  background: rgba(16, 21, 15, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.login-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.login-brand-name {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: 0.18em;
  color: #fff;
  line-height: 1;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
}

.login-field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  outline: none;
  caret-color: #98B528;
}

.login-field input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.login-field input:focus {
  border-color: rgba(152, 181, 40, 0.7);
  background: rgba(255, 255, 255, 0.12);
}

.login-submit {
  margin-top: 4px;
  width: 100%;
  padding: 13px 16px;
  border: none;
  border-radius: 12px;
  background: #fff;
  color: #10150F;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, color 0.2s ease;
}

.login-submit:hover {
  background: #98B528;
  color: #10150F;
}

.login-submit:active {
  transform: scale(0.98);
}

.login-submit.is-loading {
  pointer-events: none;
  opacity: 0.9;
}
.login-submit.is-loading::before {
  content: '';
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  margin-right: 0.55em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -0.18em;
  animation: btn-spin 0.7s linear infinite;
}

.login-error {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 59, 48, 0.22);
  border: 1px solid rgba(255, 59, 48, 0.4);
  color: #ffd7d5;
  font-size: 0.8125rem;
  font-family: 'Montserrat', system-ui, sans-serif;
  text-align: center;
}

@media (max-width: 480px) {
  .login-logo { width: 64px; height: 64px; }
  .login-brand-name { font-size: 1.35rem; }
}

/* Sin soporte de backdrop-filter: panel un poco más opaco */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .login-glass {
    background: rgba(0, 0, 0, 0.72);
  }
}
