/* ==========================================================================
   FANTASINC — AUTH STYLES
   Login y Registro
   ========================================================================== */

/* ─── Wrapper de la página de auth ──────────────────────────────────────────── */
.auth-wrapper {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-4);
  background:
    radial-gradient(ellipse 60% 40% at 70% 20%, rgba(233,30,140,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 20% 80%, rgba(156,39,176,0.05) 0%, transparent 70%),
    #FFFFFF;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: #FFFFFF;
  border: 1px solid rgba(233, 30, 140, 0.12);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  animation: fade-slide-up 0.4s ease both;
  box-shadow: 0 8px 40px rgba(233, 30, 140, 0.08), 0 2px 16px rgba(0,0,0,0.06);
}

/* ─── Logo centrado ──────────────────────────────────────────────────────────── */
.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-6);
}
.auth-logo img { height: 48px; width: auto; }

/* ─── Títulos ────────────────────────────────────────────────────────────────── */
.auth-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--font-black);
  text-align: center;
  margin-bottom: var(--space-2);
}
.auth-subtitle {
  text-align: center;
  font-size: var(--text-sm);
  margin-bottom: var(--space-6);
  color: var(--color-text-secondary);
}

/* ─── Selector de Rol ────────────────────────────────────────────────────────── */
.role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.role-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-3);
  background: var(--color-bg-elevated);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: var(--transition-bounce);
  text-align: center;
  user-select: none;
}

.role-card:hover {
  border-color: var(--color-border-medium);
  background: var(--glass-bg-hover);
  transform: translateY(-2px);
}

.role-card.is-selected {
  border-color: var(--color-accent-primary);
  background: var(--color-accent-primary-soft);
  box-shadow: 0 0 16px var(--color-accent-primary-glow);
}

.role-icon { font-size: 1.75rem; }

.role-name {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--font-bold);
  color: var(--color-text-primary);
}

.role-desc {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  line-height: 1.4;
}

.role-check {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  width: 20px; height: 20px;
  background: var(--color-accent-primary);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  color: #fff;
  opacity: 0;
  transform: scale(0);
  transition: var(--transition-bounce);
}
.role-card.is-selected .role-check {
  opacity: 1;
  transform: scale(1);
}

/* ─── Formulario de auth ─────────────────────────────────────────────────────── */
.auth-form { display: flex; flex-direction: column; gap: 0; }
.auth-form .input-group { margin-bottom: var(--space-4); }

/* Input contraseña con botón de ojo */
.input-password-wrapper {
  position: relative;
}
.input-password-wrapper .input-field {
  padding-right: 3rem;
}
.input-eye-btn {
  position: absolute;
  right: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--color-text-tertiary);
  transition: var(--transition-fast);
}
.input-eye-btn:hover { color: var(--color-text-secondary); }

/* Barra de fortaleza de contraseña */
.password-strength {
  margin-top: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.strength-bar {
  flex: 1;
  height: 4px;
  background: var(--color-bg-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.strength-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease, background 0.4s ease;
  width: 0%;
}
.strength-label {
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  white-space: nowrap;
  min-width: 80px;
  text-align: right;
}

/* ─── Checkbox legal ──────────────────────────────────────────────────────────── */
.legal-check { margin-bottom: var(--space-5); }

.custom-checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
}
.custom-checkbox input[type="checkbox"] { display: none; }

.checkbox-mark {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border: 2px solid var(--color-border-medium);
  border-radius: var(--radius-xs);
  background: var(--color-bg-elevated);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.custom-checkbox input:checked + .checkbox-mark {
  background: var(--color-accent-primary);
  border-color: var(--color-accent-primary);
}
.custom-checkbox input:checked + .checkbox-mark::after {
  content: '✓';
  color: #fff;
  font-size: 12px;
  font-weight: bold;
}

.checkbox-label {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.5;
}
.checkbox-label a {
  color: var(--color-accent-primary);
  text-decoration: underline;
}

/* ─── Mensajes de error ───────────────────────────────────────────────────────── */
.auth-error {
  background: var(--color-danger-soft);
  border: 1px solid var(--color-danger);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  color: var(--color-danger);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
  animation: fade-in 0.2s ease;
}

/* ─── Link de cambio (login/registro) ────────────────────────────────────────── */
.auth-switch {
  text-align: center;
  margin-top: var(--space-5);
  font-size: var(--text-sm);
}
.auth-switch a { color: var(--color-accent-primary); font-weight: var(--font-semibold); }

/* ─── Header de la página de auth (simplificado) ─────────────────────────────── */
.fl-header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.fl-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(233, 30, 140, 0.1);
  transition: var(--transition-default);
}

.fl-logo-img { height: 52px; width: auto; }
