/* Estilos de login.html y registro.html — reutiliza los tokens de style.css */

.auth-main {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.25rem 2rem;
  box-shadow: 0 30px 60px -30px rgba(35, 43, 57, 0.2);
}

.auth-card__eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin: 0 0 0.6rem;
  text-align: center;
}

.auth-card__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.6rem;
  text-align: center;
  margin: 0 0 0.4rem;
}

.auth-card__sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 1.8rem;
  line-height: 1.5;
}

/* --- Botones de proveedores --- */
.provider-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 1.5rem;
}

.btn-provider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.btn-provider:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.btn-provider:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-provider__icon {
  width: 20px;
  height: 20px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 50%;
}

.btn-provider--google .btn-provider__icon { color: #EA4335; }
.btn-provider--facebook .btn-provider__icon { color: #1877F2; }
.btn-provider--apple .btn-provider__icon { color: var(--ink); font-size: 1.05rem; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.4rem 0;
  color: var(--text-muted);
  font-size: 0.78rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-footer {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.auth-footer a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.auth-footer a:hover {
  color: var(--gold);
}

/* --- Modal de términos y condiciones --- */
body.modal-open {
  overflow: hidden;
}

.terms-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.terms-modal.is-hidden {
  display: none;
}

.terms-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, 0.6);
  backdrop-filter: blur(2px);
}

.terms-modal__panel {
  position: relative;
  width: min(100%, 520px);
  max-height: min(90vh, 680px);
  overflow: auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 70px -26px rgba(35, 43, 57, 0.35);
}

.terms-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.15rem 1.2rem 0.85rem;
  border-bottom: 1px solid var(--line);
}

.terms-modal__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--ink);
}

.terms-modal__close {
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
}

.terms-modal__body {
  padding: 1rem 1.2rem 1.2rem;
}

.terms-modal__intro {
  margin: 0 0 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.terms-modal__link {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--gold);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.terms-modal__content {
  margin: 0.85rem 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: rgba(179, 149, 94, 0.08);
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.6;
}

.terms-modal__content.is-hidden {
  display: none;
}

.terms-modal__referral {
  margin: 0 0 0.45rem;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
}

.terms-modal__referral-field {
  margin: 0 0 0.95rem;
}

.terms-modal__referral-field .form-input {
  width: 100%;
  padding: 0.72rem 0.9rem;
  border-radius: 10px;
}

.terms-modal__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0 0 0.8rem;
  font-size: 0.95rem;
  color: var(--ink);
}

.terms-modal__checkbox input {
  margin-top: 0.2rem;
}

.terms-modal__message {
  margin: 0 0 0.9rem;
  color: #B23A3A;
  font-size: 0.88rem;
}

.terms-modal__message.is-hidden {
  display: none;
}

/* --- Mensajes de estado --- */
.auth-alert {
  display: none;
  font-size: 0.85rem;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  margin-bottom: 1.1rem;
  line-height: 1.4;
}
.auth-alert--error {
  background: rgba(196, 68, 68, 0.08);
  color: #B23A3A;
  border: 1px solid rgba(196, 68, 68, 0.25);
}
.auth-alert--info {
  background: rgba(179, 149, 94, 0.1);
  color: #8A6A34;
  border: 1px solid rgba(179, 149, 94, 0.3);
}
.auth-alert.is-visible {
  display: block;
}

/* --- Stepper de registro --- */
.steps-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.6rem;
}
.steps-indicator__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.2s ease, transform 0.2s ease;
}
.steps-indicator__dot.is-active {
  background: var(--gold);
  transform: scale(1.3);
}
.steps-indicator__dot.is-done {
  background: var(--ink);
}

.auth-step {
  display: none;
}
.auth-step.is-active {
  display: block;
}

/* --- Formulario paso 2 --- */
.form-group {
  margin-bottom: 1.1rem;
}
.form-group--pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-bottom: 0;
}
.form-group--pair .form-group {
  margin-bottom: 1.1rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.form-input {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--cream);
  font-size: 0.92rem;
  color: var(--ink);
  font-family: inherit;
}
.form-input:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--white);
}
.form-input:disabled {
  color: var(--text-muted);
  cursor: not-allowed;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.form-section-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin: 1.4rem 0 0.8rem;
}
.form-section-label:first-child {
  margin-top: 0;
}

.btn--block {
  width: 100%;
  justify-content: center;
  display: flex;
}

.btn--loading {
  position: relative;
  color: transparent !important;
}
.btn--loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin: -8px 0 0 -8px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 1.8rem 1.4rem;
  }
  .form-group--pair {
    grid-template-columns: 1fr;
  }
}