/* ============================================
   AUTH PAGES — SaaS Modern Design
   Login · Registro · Recuperar
   ============================================ */

/* ── Background with gradient + pattern ── */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--surface-secondary) 0%, var(--surface-tertiary) 100%);
}

/* Decorative background elements */
.auth-wrapper::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 20%, var(--primary-alpha) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(37, 99, 235, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

/* Subtle grid pattern overlay */
.auth-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(var(--border-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.3;
  pointer-events: none;
}

[data-theme="dark"] .auth-wrapper {
  background: linear-gradient(135deg, #0a0f1e 0%, #0f172a 50%, #1a1f2e 100%);
}

[data-theme="dark"] .auth-wrapper::before {
  background: radial-gradient(circle at 30% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(59, 130, 246, 0.03) 0%, transparent 50%);
}

/* ── Auth Card ──────────────────────────── */
.auth-card {
  background: var(--surface);
  padding: var(--space-xxl);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  border: 1px solid var(--border);
  animation: authIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes authIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ── Brand / Logo ──────────────────────── */
.auth-brand {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.auth-brand-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-md);
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  margin-bottom: var(--space-sm);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* ── Form inputs ────────────────────────── */
.auth-wrapper .form-control {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  transition: all 0.2s ease;
}

.auth-wrapper .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-alpha);
  background: var(--surface);
}

.auth-wrapper .form-control::placeholder {
  color: var(--text-muted);
}

.auth-wrapper .input-group-text {
  background: var(--surface-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 14px;
  padding: 12px 14px;
}

/* Fix border radius for input groups */
.auth-wrapper .input-group .form-control:not(:first-child) {
  border-left: 0;
}

.auth-wrapper .input-group .input-group-text:first-child {
  border-right: 0;
}

/* ── Labels ────────────────────────────── */
.auth-wrapper .form-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* ── Alerts (error/success) ────────────── */
.auth-wrapper .alert {
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.5;
}

/* ── Divider ───────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Features list (register page) ──────── */
.auth-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.auth-features li {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.auth-features li i {
  color: var(--success);
  font-size: 14px;
  flex-shrink: 0;
}

/* ── Footer links ─────────────────────── */
.auth-footer-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: var(--tr-fast);
}

.auth-footer-link:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

/* ── Social / alternative login ────────── */
.btn-social {
  width: 100%;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  transition: var(--tr-fast);
  cursor: pointer;
}

.btn-social:hover {
  background: var(--surface-secondary);
  border-color: var(--border);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* ── Responsive ───────────────────────── */

/* Tablet & below */
@media (max-width: 640px) {
  .auth-wrapper {
    padding: var(--space-xs);
    align-items: flex-start;
    padding-top: var(--space-xxl);
  }

  .auth-card {
    padding: var(--space-xl) var(--space-lg);
    max-width: 100%;
    border-radius: var(--radius-lg);
    margin: 0;
    box-shadow: var(--shadow-md);
  }

  .auth-brand {
    font-size: 24px;
  }

  .auth-brand-icon {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }

  .auth-wrapper .form-control {
    padding: 11px 14px;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .auth-wrapper .input-group-text {
    padding: 11px 12px;
  }
}

/* Small phones (320px, 375px) */
@media (max-width: 375px) {
  .auth-wrapper {
    padding: 0;
    padding-top: var(--space-lg);
  }

  .auth-card {
    padding: var(--space-lg) var(--space-md);
    border-radius: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: none;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }

  .auth-brand {
    font-size: 22px;
  }

  .auth-wrapper .btn {
    font-size: 15px;
    padding: 12px 16px;
  }
}

/* Medium tablets */
@media (min-width: 641px) and (max-width: 1024px) {
  .auth-card {
    max-width: 440px;
  }
}

/* Large screens (1920px+) */
@media (min-width: 1920px) {
  .auth-card {
    max-width: 460px;
    padding: 48px;
  }
}
