/* ============================================================
   kp-auth.css — Login / registro / confirmación / recuperación
   Diseño femenino: rosa empolvado, degradado rosé y corona dorada.
   Solo estilo: los IDs y la lógica siguen en index.js.
   ============================================================ */
#loginModal, #signupOtpModal, #forgotPassModal, #newPasswordModal {
  --au-rose: #ff4f8b;
  --au-rose-deep: #d6246b;
  --au-plum: #8e3dbf;
  --au-ink: #3b1230;
  --au-muted: #8d6a80;
  --au-line: rgba(214, 36, 107, 0.16);
  --au-card: #fffafc;
  --au-field: #fff;
  --au-grad: linear-gradient(135deg, #ff7aa8 0%, #ff4f8b 45%, #c73ea8 100%);
}
body.dark-theme #loginModal, body.dark-theme #signupOtpModal, body.dark-theme #forgotPassModal, body.dark-theme #newPasswordModal {
  --au-ink: #ffe6f1;
  --au-muted: #d6a9c2;
  --au-line: rgba(255, 120, 170, 0.22);
  --au-card: #25101f;
  --au-field: #321628;
}

#loginModal {
  background: radial-gradient(120% 90% at 50% 0%, rgba(255, 110, 160, 0.35), rgba(40, 6, 28, 0.62)) !important;
  padding: 16px;
  box-sizing: border-box;
}

#loginModal .modal-content {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100dvh - 32px);
  border-radius: 30px;
  background:
    radial-gradient(260px 180px at 100% 0%, rgba(255, 150, 190, 0.28), transparent 70%),
    radial-gradient(240px 200px at 0% 100%, rgba(199, 62, 168, 0.14), transparent 70%),
    var(--au-card);
  border: 1px solid var(--au-line);
  box-shadow: 0 40px 90px rgba(90, 10, 50, 0.3), 0 0 0 6px rgba(255, 255, 255, 0.08);
}
#loginModal .modal-content::before { height: 0; }
#loginModal .lm-inner { padding: 26px 30px 24px; }

/* Marca */
#loginModal .lm-brand {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  margin: 2px 0 14px;
}
#loginModal .lm-brand-crown {
  display: grid; place-items: center;
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--au-grad);
  box-shadow: 0 12px 28px rgba(255, 79, 139, 0.38), inset 0 2px 0 rgba(255, 255, 255, 0.35);
  animation: au-float 4s ease-in-out infinite;
}
#loginModal .lm-brand-crown svg { filter: drop-shadow(0 2px 3px rgba(120, 30, 0, 0.3)); transform: translateY(-2px); }
#loginModal .lm-brand-name {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.05rem; letter-spacing: 0.04em; color: var(--au-ink);
}
#loginModal .lm-brand-name b {
  background: var(--au-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
@keyframes au-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* Cabecera */
#loginModal .lm-header { justify-content: center; text-align: center; margin-bottom: 18px; }
#loginModal .lm-header-text h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.7rem; font-weight: 700; color: var(--au-ink);
  -webkit-text-fill-color: currentColor; background: none;
}
#loginModal .lm-header-text p { color: var(--au-muted); font-size: 0.92rem; }
#loginModal .lm-close-btn {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255, 79, 139, 0.1); color: var(--au-rose-deep); border: 0;
}
#loginModal .lm-close-btn:hover { background: rgba(255, 79, 139, 0.2); transform: rotate(90deg); }

/* Pestañas tipo píldora */
#loginModal .lm-tabs {
  padding: 5px; gap: 4px; border-radius: 999px;
  background: rgba(255, 79, 139, 0.09); border: 1px solid var(--au-line);
  margin-bottom: 18px;
}
#loginModal .lm-tab {
  border-radius: 999px; padding: 11px 10px; font-weight: 700; font-size: 0.92rem;
  color: var(--au-muted); background: transparent; border: 0;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
#loginModal .lm-tab.active {
  background: var(--au-grad); color: #fff;
  box-shadow: 0 8px 18px rgba(255, 79, 139, 0.35);
}

/* Campos */
#loginModal .lm-field { margin-bottom: 14px; }
#loginModal .lm-field label { color: var(--au-ink); font-weight: 600; font-size: 0.84rem; margin-bottom: 6px; }
#loginModal .lm-field input {
  height: 50px; border-radius: 16px; font-size: 16px; /* 16px evita el zoom en iPhone */
  background: var(--au-field); color: var(--au-ink);
  border: 1.5px solid var(--au-line);
  box-shadow: 0 2px 0 rgba(214, 36, 107, 0.03);
}
#loginModal .lm-field input::placeholder { color: rgba(141, 106, 128, 0.7); }
#loginModal .lm-field input:focus {
  border-color: var(--au-rose);
  box-shadow: 0 0 0 4px rgba(255, 79, 139, 0.16);
}
#loginModal .lm-input-wrap:focus-within .lm-input-icon { color: var(--au-rose); }
#loginModal #forgotPassLink { color: var(--au-rose-deep); font-weight: 600; font-size: 0.82rem; text-decoration: none; }
#loginModal #forgotPassLink:hover { text-decoration: underline; }
#loginModal .lm-strength-fill { background: var(--au-grad); }

/* Botón principal */
#loginModal .lm-submit-btn, #signupOtpModal .lm-submit-btn, #forgotPassModal .lm-submit-btn, #newPasswordModal .lm-submit-btn {
  height: 52px; border-radius: 999px; border: 0;
  background: var(--au-grad); color: #fff;
  font-weight: 800; font-size: 1rem; letter-spacing: 0.01em;
  box-shadow: 0 14px 30px rgba(255, 79, 139, 0.38);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
#loginModal .lm-submit-btn { width: 100%; margin-top: 6px; }

/* Separador y Google */
#loginModal .lm-divider { color: var(--au-muted); margin: 18px 0 14px; text-transform: lowercase; }
#loginModal .lm-social-row { display: block; }
#loginModal .lm-social-btn.lm-google {
  width: 100%; height: 50px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--au-field); color: var(--au-ink);
  border: 1.5px solid var(--au-line); font-weight: 700; font-size: 0.95rem;
  box-shadow: 0 4px 14px rgba(90, 10, 50, 0.06);
}
#loginModal .lm-social-btn.lm-google:hover { border-color: var(--au-rose); transform: translateY(-1px); }
#loginModal .lm-footer-note { color: var(--au-muted); margin-top: 16px; }
#loginModal .lm-footer-note a { color: var(--au-rose-deep); }

/* Móvil: hoja inferior */
@media (max-width: 560px) {
  #loginModal { padding: 0; align-items: flex-end !important; }
  #loginModal .modal-content {
    width: 100%; max-height: 94dvh; border-radius: 28px 28px 0 0;
    animation: au-sheet 0.42s cubic-bezier(0.22, 1, 0.36, 1);
    padding-bottom: env(safe-area-inset-bottom);
  }
  #loginModal .modal-content::after {
    content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
    width: 42px; height: 5px; border-radius: 9px; background: rgba(214, 36, 107, 0.2);
  }
  #loginModal .lm-inner { padding: 24px 20px 22px; }
  #loginModal .lm-header-text h3 { font-size: 1.5rem; }
  #loginModal .lm-brand-crown { width: 54px; height: 54px; }
}
@keyframes au-sheet { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* Modales secundarios con la misma estética */
#signupOtpModal .modal-content, #forgotPassModal .modal-content, #newPasswordModal .modal-content {
  background: radial-gradient(260px 160px at 100% 0%, rgba(255, 150, 190, 0.26), transparent 70%), var(--au-card) !important;
  border: 1px solid var(--au-line); border-radius: 28px !important;
  box-shadow: 0 40px 90px rgba(90, 10, 50, 0.3);
}
#signupOtpModal h3, #forgotPassModal h3, #newPasswordModal h3 { font-family: "Playfair Display", Georgia, serif; color: var(--au-ink) !important; font-size: 1.45rem; }
#signupOtpModal input, #forgotPassModal input, #newPasswordModal input { font-size: 16px !important; border-radius: 16px !important; }
#signupOtpModal .kp-mail-icon {
  width: 76px; height: 76px; margin: 0 auto 12px; border-radius: 50%;
  display: grid; place-items: center; font-size: 2.2rem;
  background: var(--au-grad); box-shadow: 0 14px 30px rgba(255, 79, 139, 0.35);
  animation: au-float 3.5s ease-in-out infinite;
}
