/* ===== Login Modal ===== */
.login-modal.hidden { display: none; }

.login-modal {
  position: fixed; inset: 0; z-index: 1000;
}


.login-dialog {
  position: relative;
  margin: 10vh auto 0;
  width: min(92vw, 420px);
  background: #fff; color: #1f2328;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  padding: 18px 16px 16px;
}

.login-close {
  position: absolute; right: 10px; top: 8px;
  background: none; border: none; cursor: pointer;
  font-size: 22px; line-height: 1;
}

.login-step h2 {
  margin: 6px 0 4px; font-size: 1.2rem; color: #111;
}

.login-desc { color: #6b7280; font-size: .95rem; margin-bottom: 10px; }

.login-label { display: grid; gap: 6px; margin-bottom: 10px; }
.login-label span { font-size: .9rem; color: #374151; }
.login-label input {
  height: 44px; padding: 0 12px; font-size: 1rem;
  border: 1px solid #e5e7eb; border-radius: 10px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.login-label input:focus {
  border-color: #cbd5e1; box-shadow: 0 0 0 4px rgba(17,17,17,.06);
}

.login-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.btn-primary, .btn-secondary, .linklike {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 110px; height: 40px; padding: 0 14px;
  border-radius: 10px; cursor: pointer; user-select: none;
  border: 1px solid #e5e7eb; text-decoration: none; font-weight: 600;
  transition: background .15s ease, transform .06s ease, box-shadow .15s ease;
}
.btn-primary { background: #111; color: #fff; }
.btn-primary:hover { box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.btn-primary:active { transform: translateY(1px); }

.btn-secondary { background: #f8fafc; color: #111; }
.btn-secondary:hover { background: #f1f5f9; }
.btn-secondary:active { transform: translateY(1px); }

.linklike {
  background: transparent; border: none; color: #111; min-width: unset; height: auto; padding: 0;
}
.linklike[disabled] { opacity: .6; cursor: not-allowed; }

.login-error {
  margin-top: 8px; background: #fff1f2; color: #b91c1c;
  border: 1px solid #fecaca; border-radius: 10px; padding: 8px 10px;
  font-size: .9rem;
}

.login-resend { margin-top: 10px; color: #6b7280; font-size: .9rem; }

/* Compacto en pantallas chicas */
@media (max-width: 380px) {
  .login-dialog { width: 94vw; padding: 16px; }
}

.login-dialog {
  transform: translateY(8px) scale(.985);
  opacity: 0;
  transition:
    transform .22s cubic-bezier(.2,.7,.2,1),
    opacity   .22s ease;
  will-change: transform, opacity;
}

/* Estado abierto */
.login-modal.is-open .login-backdrop { opacity: 1; }
.login-modal.is-open .login-dialog  { transform: none; opacity: 1; }

/* Estado cerrando (reverse suave) */
.login-modal.is-closing .login-backdrop { opacity: 0; }
.login-modal.is-closing .login-dialog  { transform: translateY(6px) scale(.985); opacity: 0; }