/* ============================================
   AUTH PAGES - LOGIN, REGISTRO, RECUPERAR
   Paleta Corporativa - 100% Consistente
   ============================================ */

:root {
  /* Colores Corporativos */
  --color-primary: #02408f;
  --color-secondary: #02b8eb;
  --color-accent: #ff9923;
  --color-neutral: #e8e8e8;
  
  /* Gradientes */
  --gradient-primary: linear-gradient(135deg, #02408f 0%, #02b8eb 100%);
  --gradient-accent: linear-gradient(135deg, #ff9923 0%, #ff7b00 100%);
  
  /* Texto */
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-tertiary: #6b7280;
  
  /* Sombras */
  --shadow-xs: 0 1px 3px rgba(2, 64, 143, 0.08);
  --shadow-sm: 0 2px 8px rgba(2, 64, 143, 0.1);
  --shadow-md: 0 8px 24px rgba(2, 64, 143, 0.15);
  --shadow-lg: 0 12px 32px rgba(2, 64, 143, 0.2);
  
  /* Radios */
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 12px;
  --radius-full: 999px;
  
  /* Transiciones */
  --transition: all 0.2s ease;
}


/* ============================================
   RESET Y BASE
============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--gradient-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(2, 184, 235, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, rgba(255, 153, 35, 0.1) 0%, transparent 40%);
  opacity: 0.6;
  pointer-events: none;
}


/* ============================================
   CONTENEDOR PRINCIPAL
============================================ */

.login-container,
.auth-container {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ============================================
   HEADER
============================================ */

.login-header,
.auth-header {
  background: var(--gradient-primary);
  color: #ffffff;
  padding: 36px 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-header::before,
.auth-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.15), transparent 60%);
  opacity: 0.8;
}

.login-header h1,
.auth-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.login-header h1 i,
.auth-header h1 i {
  color: var(--color-accent);
  margin-right: 8px;
  font-size: 1.4rem;
}

.login-header p,
.auth-header p {
  opacity: 0.95;
  font-size: 0.88rem;
  position: relative;
  z-index: 1;
}


/* ============================================
   BODY
============================================ */

.login-body,
.auth-body {
  padding: 32px 28px;
}


/* ============================================
   FORMULARIO
============================================ */

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.85rem;
}

.input-group {
  position: relative;
}

.input-group i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-size: 0.9rem;
  transition: var(--transition);
}

.form-control {
  width: 100%;
  padding: 11px 14px 11px 42px;
  border: 1.5px solid var(--color-neutral);
  border-radius: var(--radius);
  font-size: 0.88rem;
  transition: var(--transition);
  background: #fafbfc;
  color: var(--text-primary);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(2, 184, 235, 0.12);
  background: #ffffff;
}

.form-control:focus + i {
  color: var(--color-secondary);
}

.form-control::placeholder {
  color: #9ca3af;
}


/* ============================================
   CHECKBOX
============================================ */

.form-check {
  display: flex;
  align-items: center;
  margin-bottom: 18px;
}

.form-check input[type="checkbox"] {
  margin-right: 8px;
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--color-primary);
}

.form-check label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 500;
  margin: 0;
}


/* ============================================
   BOTÓN PRINCIPAL
============================================ */

.btn-login,
.btn-auth {
  width: 100%;
  padding: 12px 16px;
  background: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(2, 64, 143, 0.3);
}

.btn-login:hover,
.btn-auth:hover {
  background: var(--color-secondary);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(2, 184, 235, 0.35);
}

.btn-login:active,
.btn-auth:active {
  transform: translateY(0);
}

.btn-login i,
.btn-auth i {
  font-size: 0.95rem;
}


/* ============================================
   ALERTAS
============================================ */

.alert {
  padding: 12px 14px;
  border-radius: var(--radius);
  margin-bottom: 18px;
  font-size: 0.85rem;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert i {
  font-size: 1rem;
  margin-top: 1px;
  flex-shrink: 0;
}

.alert-danger {
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
  border-left: 3px solid #dc2626;
}

.alert-success {
  background: rgba(22, 163, 74, 0.08);
  color: #15803d;
  border-left: 3px solid #16a34a;
}

.alert-warning {
  background: rgba(245, 158, 11, 0.08);
  color: #d97706;
  border-left: 3px solid #f59e0b;
}

.alert-info {
  background: rgba(2, 184, 235, 0.08);
  color: var(--color-primary);
  border-left: 3px solid var(--color-secondary);
}


/* ============================================
   DIVIDER
============================================ */

.divider {
  text-align: center;
  margin: 22px 0;
  color: var(--text-tertiary);
  font-size: 0.82rem;
  font-weight: 500;
  position: relative;
}

.divider::before,
.divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 38%;
  height: 1px;
  background: var(--color-neutral);
}

.divider::before {
  left: 0;
}

.divider::after {
  right: 0;
}


/* ============================================
   ENLACES
============================================ */

.links {
  text-align: center;
  margin-top: 18px;
}

.links a {
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 6px 0;
  font-weight: 600;
  transition: var(--transition);
}

.links a:hover {
  color: var(--color-secondary);
  transform: translateX(2px);
}

.links a i {
  font-size: 0.85rem;
}


/* ============================================
   BACK HOME
============================================ */

.back-home {
  text-align: center;
  padding: 18px 28px;
  background: #fafbfc;
  border-top: 1px solid var(--color-neutral);
}

.back-home a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  transition: var(--transition);
}

.back-home a:hover {
  color: var(--color-primary);
  transform: translateX(-2px);
}

.back-home a i {
  font-size: 0.9rem;
}


/* ============================================
   BOTÓN SECUNDARIO
============================================ */

.btn-secondary {
  width: 100%;
  padding: 11px 16px;
  background: #ffffff;
  color: var(--color-primary);
  border: 1.5px solid var(--color-neutral);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.btn-secondary:hover {
  background: #fafbfc;
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-xs);
}


/* ============================================
   RESPONSIVE
============================================ */

@media (max-width: 480px) {
  body {
    padding: 16px;
  }

  .login-container,
  .auth-container {
    max-width: 100%;
    border-radius: var(--radius);
  }

  .login-header,
  .auth-header {
    padding: 28px 20px;
  }

  .login-header h1,
  .auth-header h1 {
    font-size: 1.4rem;
  }

  .login-body,
  .auth-body {
    padding: 24px 20px;
  }

  .form-group {
    margin-bottom: 16px;
  }

  .back-home {
    padding: 16px 20px;
  }
}


/* ============================================
   ACCESIBILIDAD
============================================ */

.btn-login:focus-visible,
.btn-auth:focus-visible,
.btn-secondary:focus-visible,
.form-control:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}


/* ============================================
   UTILIDADES
============================================ */

.text-center {
  text-align: center;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
