/* ============================================================
   GYMHUB · AUTH PAGES — Modern Design  v2
   Paleta principal: morado #7C3AED, azul oscuro #0d1b2a, blanco
   Paleta secundaria: verde agua #14b8a6, azul, celeste
   ============================================================ */

/* ── Variables de paleta ────────────────────────────────────── */
:root {
  --gh-primary:        #7C3AED;   /* morado */
  --gh-primary-dark:   #6d28d9;
  --gh-primary-light:  #f5f3ff;
  --gh-primary-ring:   rgba(124,58,237,.15);
  --gh-accent:         #14b8a6;   /* verde agua — secundario */
  --gh-accent-dark:    #0d9488;
  --gh-dark:           #0d1b2a;   /* azul oscuro */
  --gh-dark2:          #0f2133;
  --gh-text:           #0f172a;
  --gh-muted:          #64748b;
  --gh-border:         #e2e8f0;
  --gh-surface:        #f8fafc;
  --gh-white:          #ffffff;
}

/* ── Reset / base ───────────────────────────────────────────── */
body.gh-auth-body {
  margin: 0; padding: 0;
  font-family: 'Inter', 'Roboto', sans-serif;
  background: #f1f5f9;
  min-height: 100vh;
}
body.gh-auth-body .loader-fill { background: var(--gh-primary); }

/* ── Wrapper ────────────────────────────────────────────────── */
.gh-auth-wrapper { display: flex; min-height: 100vh; }
.gh-auth-wrapper.no-side .gh-auth-form-col { flex: 1; justify-content: center; max-width: 100%; }

/* ── Columna formulario ─────────────────────────────────────── */
.gh-auth-form-col {
  flex: 0 0 65%; max-width: 65%;
  display: flex; align-items: center; justify-content: center;
  background: var(--gh-white);
  padding: 2.5rem 3rem;
}
.gh-auth-wrapper.no-side .gh-auth-form-col { flex: 1; max-width: 100%; }
.gh-auth-form-inner { width: 100%; max-width: 440px; }

/* ── Logo ───────────────────────────────────────────────────── */
.gh-auth-logo { margin-bottom: 2rem; }
.gh-auth-logo a { text-decoration: none; }
.gh-auth-logo img { max-height: 42px; width: auto; }

/* ── Heading ────────────────────────────────────────────────── */
.gh-auth-heading { margin-bottom: 1.75rem; }
.gh-auth-heading h2 {
  font-size: 1.65rem; font-weight: 800;
  color: var(--gh-text); margin: 0 0 .35rem; letter-spacing: -.02em;
}
.gh-auth-heading p { font-size: .9rem; color: var(--gh-muted); margin: 0; }

/* ── Campo con ícono ────────────────────────────────────────── */
.gh-field { position: relative; margin-bottom: .875rem; }
.gh-field-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: #94a3b8; font-size: 1rem; pointer-events: none; z-index: 5;
  transition: color .2s;
}
.gh-field:focus-within .gh-field-icon { color: var(--gh-primary); }

.gh-field .form-control,
.gh-field .form-select,
.gh-field .form-floating .form-control {
  padding-left: 2.75rem !important;
  border-radius: 10px !important;
  border: 1.5px solid var(--gh-border) !important;
  background: var(--gh-surface) !important;
  font-size: .9rem !important; height: 52px !important;
  color: var(--gh-text) !important;
  transition: all .2s !important; font-family: inherit !important;
}
.gh-field .form-control:focus,
.gh-field .form-select:focus,
.gh-field .form-floating .form-control:focus {
  border-color: var(--gh-primary) !important;
  background: var(--gh-white) !important;
  box-shadow: 0 0 0 3px var(--gh-primary-ring) !important;
  outline: none !important;
}
/* Floating label */
.gh-field .form-floating label {
  padding-left: 2.75rem !important; color: #94a3b8 !important; font-size: .875rem !important;
}
.gh-field .form-floating .form-control:focus ~ label,
.gh-field .form-floating .form-control:not(:placeholder-shown) ~ label {
  padding-left: 2.75rem !important; color: var(--gh-primary) !important; font-size: .75rem !important;
}
/* Password toggle */
.gh-pwd-btn {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #94a3b8; cursor: pointer;
  padding: 4px; z-index: 5; font-size: .95rem; transition: color .2s; line-height: 1;
}
.gh-pwd-btn:hover { color: var(--gh-primary); }

/* ── Grid 2 col ─────────────────────────────────────────────── */
.gh-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
@media (max-width: 480px) { .gh-grid-2 { grid-template-columns: 1fr; } }

/* ── Remember + Forgot ──────────────────────────────────────── */
.gh-auth-options {
  display: flex; align-items: center; justify-content: space-between;
  margin: .1rem 0 1.25rem;
}
.gh-auth-options .form-check-label { font-size: .875rem; color: #475569; }
.gh-link {
  font-size: .875rem; font-weight: 600;
  color: var(--gh-primary); text-decoration: none; transition: color .2s;
}
.gh-link:hover { color: var(--gh-primary-dark); }

/* ── Terms ──────────────────────────────────────────────────── */
.gh-terms {
  display: flex; align-items: flex-start; gap: .65rem;
  padding: .75rem 1rem;
  background: var(--gh-primary-light);
  border: 1.5px solid #c4b5fd;
  border-radius: 10px; margin: .5rem 0 1.25rem;
}
.gh-terms .form-check-input { margin-top: .1rem; flex-shrink: 0; }
.gh-terms label { font-size: .875rem; color: #3b0764; cursor: pointer; }
.gh-terms a { color: var(--gh-primary); font-weight: 600; text-decoration: none; }
.gh-terms a:hover { color: var(--gh-primary-dark); }

/* ── reCAPTCHA ──────────────────────────────────────────────── */
.gh-captcha { margin: .75rem 0; }

/* ── Botón principal (MORADO) ───────────────────────────────── */
.gh-btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  width: 100%; padding: .875rem 1rem;
  background: linear-gradient(135deg, var(--gh-primary) 0%, var(--gh-primary-dark) 100%);
  color: var(--gh-white); border: none; border-radius: 10px;
  font-size: 1rem; font-weight: 700; letter-spacing: .01em;
  cursor: pointer; transition: all .2s;
  box-shadow: 0 4px 14px rgba(124,58,237,.35);
  text-decoration: none; font-family: inherit;
}
.gh-btn:hover {
  opacity: .93; transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124,58,237,.45); color: var(--gh-white);
}
.gh-btn:active { transform: translateY(0); }
.gh-btn-outline {
  background: transparent; color: var(--gh-primary);
  border: 1.5px solid var(--gh-primary); box-shadow: none;
}
.gh-btn-outline:hover {
  background: var(--gh-primary-light); color: var(--gh-primary-dark); border-color: var(--gh-primary-dark);
}
.gh-btn-sm { padding: .55rem 1rem; font-size: .875rem; }
.gh-btn-muted {
  background: #f1f5f9 !important; color: var(--gh-muted) !important;
  border: 1.5px solid var(--gh-border) !important; box-shadow: none !important;
}
.gh-btn-muted:hover { background: #e2e8f0 !important; }

/* ── Divider ────────────────────────────────────────────────── */
.gh-divider {
  display: flex; align-items: center; gap: .75rem; margin: 1.25rem 0;
  color: #94a3b8; font-size: .8rem;
}
.gh-divider::before, .gh-divider::after { content: ''; flex: 1; height: 1px; background: var(--gh-border); }

/* ── Footer link ────────────────────────────────────────────── */
.gh-auth-footer { text-align: center; font-size: .9rem; color: var(--gh-muted); margin-top: .25rem; }
.gh-auth-footer a { color: var(--gh-primary); font-weight: 700; text-decoration: none; margin-left: .25rem; }
.gh-auth-footer a:hover { color: var(--gh-primary-dark); }

/* ── Alerts ─────────────────────────────────────────────────── */
.gh-alert {
  border-radius: 10px !important; border: none !important;
  font-size: .875rem !important; padding: .75rem 1rem !important;
  margin-bottom: 1rem !important;
  display: flex; align-items: flex-start; gap: .5rem;
}
.gh-alert i { flex-shrink: 0; margin-top: .05rem; }
.gh-alert.alert-success { background: #dcfce7 !important; color: #166534 !important; }
.gh-alert.alert-danger  { background: #fee2e2 !important; color: #991b1b !important; }
.gh-alert.alert-warning { background: #fef3c7 !important; color: #92400e !important; }
.gh-alert.alert-info    { background: var(--gh-primary-light) !important; color: #3b0764 !important; }

/* ── Info box (requisitos, etc.) ────────────────────────────── */
.gh-info-box {
  background: var(--gh-primary-light);
  border: 1.5px solid #c4b5fd;
  border-radius: 10px; padding: .875rem 1rem;
  font-size: .83rem; color: #3b0764; margin-bottom: 1rem;
}
.gh-info-box ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.gh-info-box li { margin-bottom: .2rem; }

/* ── Status card ────────────────────────────────────────────── */
.gh-status-card { text-align: center; padding: 1.5rem 0; }
.gh-status-icon {
  width: 72px; height: 72px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; margin: 0 auto 1.25rem;
}
.gh-status-icon.success { background: #dcfce7; color: #16a34a; }
.gh-status-icon.info    { background: var(--gh-primary-light); color: var(--gh-primary); }
.gh-status-icon.warning { background: #fef3c7; color: #d97706; }
.gh-status-card h2 { font-size: 1.4rem; font-weight: 800; color: var(--gh-text); margin: 0 0 .5rem; }
.gh-status-card p  { font-size: .9rem; color: var(--gh-muted); line-height: 1.6; margin: 0 0 .75rem; }
.gh-timer-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ── Columna lateral (azul oscuro) ─────────────────────────── */
.gh-auth-side-col {
  flex: 0 0 35%; max-width: 35%;
  background: linear-gradient(160deg, var(--gh-dark) 0%, var(--gh-dark2) 55%, #0a1628 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 3rem 2rem; position: relative; overflow: hidden;
}
/* círculos decorativos — morado + celeste */
.gh-auth-side-col::before {
  content: ''; position: absolute; width: 350px; height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,.18) 0%, transparent 70%);
  top: -80px; right: -80px;
}
.gh-auth-side-col::after {
  content: ''; position: absolute; width: 250px; height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20,184,166,.12) 0%, transparent 70%);
  bottom: -60px; left: -60px;
}
.gh-auth-side-inner { position: relative; z-index: 2; width: 100%; max-width: 380px; }

/* Carrusel dots */
.carousel-indicators.gh-carousel-dots {
  position: relative; margin: 1.5rem 0 0; bottom: auto;
}
.carousel-indicators.gh-carousel-dots button {
  width: 28px; height: 4px; border-radius: 2px;
  background: rgba(255,255,255,.25); border: none;
  margin: 0 3px; transition: all .3s;
}
.carousel-indicators.gh-carousel-dots button.active {
  background: var(--gh-primary); width: 36px;
}

.gh-side-title {
  font-size: 1.75rem; font-weight: 800; color: var(--gh-white);
  line-height: 1.25; margin: 0 0 .75rem; letter-spacing: -.02em;
  text-align: center;
}
.gh-side-desc {
  font-size: .9rem; color: rgba(255,255,255,.65); line-height: 1.65; margin: 0;
  text-align: center;
}
.gh-side-image { margin-top: 2rem; text-align: center; }
.gh-side-image img {
  max-width: 80%; max-height: 420px; object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.3));
}

/* ── 2FA Modal ──────────────────────────────────────────────── */
.gh-modal .modal-content {
  border: none !important; border-radius: 16px !important;
  overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.18) !important;
}
.gh-modal .modal-header {
  background: var(--gh-primary-light) !important;
  border-bottom: 1.5px solid #c4b5fd !important;
  padding: 1.25rem 1.5rem !important;
}
.gh-modal .modal-body { padding: 1.4rem 1.5rem !important; }
.gh-security-step {
  background: var(--gh-surface); border: 1px solid var(--gh-border);
  border-radius: 10px; padding: .75rem 1rem; font-size: .875rem; margin-bottom: .6rem;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .gh-auth-side-col { display: none; }
  .gh-auth-form-col { flex: 1; max-width: 100%; padding: 2rem 1.5rem; }
}
@media (max-width: 480px) {
  .gh-auth-form-inner { padding: 0; }
  .gh-auth-form-col   { padding: 1.5rem 1.25rem; }
}