/* ============================================================
   rg-login-revamp.css
   Estilos blindados para Modal Login / Recuperación V2
   Aislados de Materialize CSS con prefijo .rg-
   ============================================================ */

/* ── Overlay ─────────────────────────────────────────────── */
.rg-login-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 9999;
  background: rgba(27,43,107,0.5);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

/* ── Card ─────────────────────────────────────────────────── */
.rg-card {
  background: #fff;
  border-radius: 32px;
  padding: 40px;
  width: 95%;
  max-width: 440px;
  box-shadow: 0 20px 48px rgba(27,43,107,0.18);
  position: relative;
  box-sizing: border-box !important;
  max-height: 95vh;
  overflow-y: auto;
  overflow-x: hidden;
}
.rg-card * {
  font-family: 'Nunito', sans-serif !important;
  box-sizing: border-box !important;
}

/* ── Marca / Brand ────────────────────────────────────────── */
.rg-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}
.rg-brand-mark {
  width: 38px; height: 38px;
  background: #1B2B6B;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.rg-brand-name {
  font-family: 'Nunito Sans', sans-serif !important;
  font-weight: 900;
  font-size: 20px;
  color: #1B2B6B;
  letter-spacing: -0.5px;
  margin: 0;
  line-height: 1;
}

/* ── Tipografía de panel ──────────────────────────────────── */
.rg-panel-title {
  font-family: 'Nunito Sans', sans-serif !important;
  font-weight: 900;
  font-size: 26px;
  color: #1B2B6B !important;
  letter-spacing: -0.4px;
  margin: 0 0 24px 0;
  line-height: 1.2;
  text-transform: none !important;
}
.rg-panel-subtitle {
  font-size: 13px;
  color: #8A8FA8;
  font-weight: 600;
  margin-bottom: 20px;
  line-height: 1.6;
}

/* ── Botones Sociales ─────────────────────────────────────── */
.rg-social-row  { display: flex; gap: 8px; margin-bottom: 20px; width: 100%; }
.rg-social-form { flex: 1; margin: 0 !important; min-width: 0; }
.rg-social-btn {
  width: 100%; height: 44px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 1.5px solid #DDE1EA;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  font-weight: 800; font-size: 12px; color: #1B2B6B;
  transition: all .2s;
  margin: 0 !important; box-shadow: none !important;
  padding: 0 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rg-social-btn:hover { border-color: #1B2B6B; background: #F0F2F8; transform: translateY(-1px); }
.rg-social-btn svg  { flex-shrink: 0; }

/* ── Divisor ──────────────────────────────────────────────── */
.rg-divider {
  text-align: center; font-size: 13px; color: #8A8FA8;
  margin: 16px 0 20px 0;
  position: relative; font-weight: 700; width: 100%;
}
.rg-divider::before, .rg-divider::after {
  content: ''; position: absolute; top: 50%;
  width: 35%; height: 1px; background: #EAEDF3;
}
.rg-divider::before { left: 0; }
.rg-divider::after  { right: 0; }
.rg-divider span    { position: relative; z-index: 1; background: #fff; padding: 0 10px; }

/* ── Formulario ───────────────────────────────────────────── */
.rg-form-row { display: flex; gap: 12px; margin-bottom: 20px; width: 100%; }

.rg-label {
  font-size: 13px; font-weight: 800; color: #1B2B6B;
  margin-bottom: 8px; display: block;
  text-transform: none !important;
}
.rg-label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.rg-label-row .rg-label { margin-bottom: 0; }

.rg-input, .rg-select {
  width: 100%;
  padding: 0 16px !important;
  height: 48px !important;
  border: 1.5px solid #DDE1EA !important;
  border-radius: 14px !important;
  font-size: 15px; font-weight: 600; color: #1B2B6B;
  outline: none;
  background: #fff !important;
  transition: border-color .2s;
  margin: 0 !important; box-shadow: none !important;
}
.rg-input:focus, .rg-select:focus { border-color: #1B2B6B !important; }
.rg-input--error { border-color: #EF4444 !important; background: #FFF5F5; }
.rg-select {
  appearance: none;
  background-color: #F8FAFC !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238A8FA8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 28px !important;
}

.rg-input-wrap              { position: relative; margin-bottom: 24px; width: 100%; }
.rg-input-wrap .rg-input   { padding-right: 44px !important; }
.rg-icon-btn {
  position: absolute; right: 0; top: 0;
  height: 100%; width: 44px;
  background: none; border: none; cursor: pointer;
  color: #8A8FA8;
  display: flex; align-items: center; justify-content: center;
  transition: color .2s;
  padding: 0; margin: 0; outline: none; opacity: 0.4;
}
.rg-icon-btn:hover { color: #1B2B6B; opacity: 1 !important; }

/* ── CTA Buttons ──────────────────────────────────────────── */
.rg-btn-primary {
  background: #1B2B6B !important;
  color: #fff !important;
  border-radius: 50px !important;
  padding: 15px !important;
  font-weight: 800; font-size: 16px;
  border: none; cursor: pointer;
  width: 100%; text-align: center;
  transition: all .2s;
  margin: 0 !important; box-shadow: none !important;
}
.rg-btn-primary:hover { background: #2E3FA3 !important; transform: translateY(-1px); }

.rg-btn-whatsapp {
  background: #25D366 !important;
  color: #fff !important;
  border-radius: 14px !important;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 800; text-decoration: none;
  padding: 15px; width: 100%;
  transition: all .2s;
}
.rg-btn-whatsapp:hover { background: #1ebe5a !important; transform: translateY(-1px); }

.rg-btn-ghost {
  background: transparent !important;
  color: #1B2B6B !important;
  border: 1.5px solid #DDE1EA !important;
  border-radius: 14px !important;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; text-decoration: none;
  padding: 13.5px; width: 100%;
  transition: all .2s; cursor: pointer;
}
.rg-btn-ghost:hover { border-color: #1B2B6B !important; background: #F0F2F8 !important; }

/* ── Footer del modal ─────────────────────────────────────── */
.rg-footer {
  margin-top: 20px; padding-top: 20px;
  border-top: 1px solid #EAEDF3;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px; width: 100%;
}
.rg-link { font-size: 14px; color: #2E3FA3; font-weight: 800; text-decoration: none; transition: color .2s; }
.rg-link:hover { color: #CE0037; }

/* ── WhatsApp icon ────────────────────────────────────────── */
.wa-icon {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: #25D366;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}

/* ── Alerta de error ──────────────────────────────────────── */
.rg-alert-error {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #FEF2F2;
  border: 1.5px solid #FECACA;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 20px;
}
.rg-alert-error-icon {
  width: 28px; height: 28px;
  background: #EF4444;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.rg-alert-error-body { flex: 1; min-width: 0; }
.rg-alert-error-title {
  font-weight: 800;
  font-size: 14px;
  color: #991B1B;
  margin-bottom: 2px;
}
.rg-alert-error-desc {
  font-size: 13px;
  color: #7F1D1D;
  line-height: 1.5;
}

/* ── Paneles con animación ────────────────────────────────── */
.rg-panel        { display: none; animation: rgFadeIn 0.3s ease; }
.rg-panel.active { display: block; }

@keyframes rgFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
