/* ====== VARIABLES ====== */
:root {
  --gym-red: #e60023;
  --gym-dark: #0f0f10;
  --gym-gray: #6b6b6b;
  --gym-border: #efefef;
}

/* ====== BACKDROP GENERAL ====== */
.auth-modal-backdrop,
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.78);
  z-index: 4000;
  justify-content: center;
  align-items: center;
  padding: 16px;
}
.auth-modal-backdrop.active,
.modal-backdrop.active {
  display: flex;
}

/* ====== MODALES (LOGIN / PAGO / CONFIRMACIÓN) ====== */
.auth-modal,
.modal-content {
  width: min(480px, 95vw);
  max-height: 85vh;          /* evita que crezca infinito */
  overflow-y: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
  padding: 26px 22px;
  position: relative;
  font-family: "Poppins", sans-serif;
  animation: modalIn .25s ease;
  border: 2px solid var(--gym-red);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ====== BOTÓN CERRAR ====== */
.auth-close,
.close-modal {
  position: absolute;
  right: 12px;
  top: 12px;
  background: #fff;
  border: 1px solid #ddd;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #444;
  transition: 0.2s;
}
.auth-close:hover,
.close-modal:hover {
  background: #111;
  color: #fff;
  border-color: #111;
}

/* ====== TÍTULOS ====== */
.auth-title,
.payment-title,
.confirmation-title {
  margin: 6px 0 18px;
  text-align: center;
  font-weight: 800;
  font-size: 1.35rem;
  color: #111;
  letter-spacing: 0.2px;
}

/* ====== FORMULARIOS AUTH ====== */
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.hidden { display: none !important; }

.auth-group label {
  display: block;
  font-size: .9rem;
  color: #1b1b1b;
  margin-bottom: 6px;
}
.auth-group input {
  width: 95%;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 12px;
  font-size: .95rem;
  outline: none;
  transition: border .2s, box-shadow .2s;
}
.auth-group input:focus {
  border-color: var(--gym-red);
  box-shadow: 0 0 0 3px rgba(230,0,35,.15);
}

/* ====== BOTONES ====== */
.auth-btn,
.confirmation-btn {
  background: var(--gym-red);
  color: #fff;
  border: none;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .05s ease, background .2s;
  text-align: center;
}
.auth-btn:hover,
.confirmation-btn:hover { background: #b8001c; }
.auth-btn:active,
.confirmation-btn:active { transform: translateY(1px); }

.auth-btn.ghost {
  background: #fff;
  color: #111;
  border: 1px solid #ddd;
}
.auth-btn.ghost:hover { background: #111; color: #fff; }

/* Botones dobles */
.auth-actions-2 { display: flex; gap: 10px; }

/* ====== LINKS ====== */
.auth-links {
  text-align: center;
  color: #454545;
  font-size: .9rem;
}
.auth-links a {
  color: var(--gym-red);
  font-weight: 700;
  text-decoration: none;
}
.auth-links a:hover { color: #000; }

/* ====== MENSAJES ====== */
.auth-msg,
#paymentStatus {
  min-height: 20px;
  font-size: .9rem;
  text-align: center;
}


/* ====== RESPONSIVE ====== */
@media (max-width: 480px) {
  .auth-title,
  .payment-title,
  .confirmation-title { font-size: 1.2rem; }
  .auth-group input { padding: 14px; font-size: 1rem; }
  .auth-btn,
  .confirmation-btn { padding: 14px 16px; }
}
