/* css/auth.css */
/* Estilos globales para autenticación */

/* ============================================ */
/* AUTH UI - Header */
/* ============================================ */

#auth-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Botón "Iniciar sesión" - Claro y visible */
.btn-login-header {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-login-header:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Botón "Registrarse" - Azul primario */
.btn-register-header {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  background: #ffffff;
  color: #1a5a8c;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid #ffffff;
}

.btn-register-header:hover {
  background: #f0f4f8;
  transform: translateY(-1px);
}

/* Usuario autenticado */
.auth-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Saludo "Bienvenido" - Texto claro sobre fondo oscuro */
.user-greeting {
  font-size: 15px;
  color: #ffffff;
  font-weight: 400;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.user-greeting strong {
  font-weight: 700;
  color: #ffffff;
}

/* Botón "Cerrar sesión" */
.btn-logout {
  padding: 6px 14px;
  background: rgba(254, 226, 226, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(252, 165, 165, 0.3);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-logout:hover {
  background: rgba(254, 226, 226, 0.3);
  border-color: rgba(252, 165, 165, 0.5);
}

/* ============================================ */
/* PÁGINAS DE REGISTRO Y LOGIN */
/* ============================================ */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f9fc;
  padding: 20px;
}

.auth-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 40px 36px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #eef2f6;
}

.auth-card .logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-card .logo h1 {
  font-size: 24px;
  font-weight: 700;
  color: #0a1628;
  margin: 0;
}

.auth-card .logo .subtitle {
  font-size: 14px;
  color: #6b7a8f;
  margin: 4px 0 0 0;
}

.auth-card h2 {
  font-size: 20px;
  font-weight: 700;
  color: #0a1628;
  margin: 0 0 6px 0;
  text-align: center;
}

.auth-card .auth-description {
  font-size: 14px;
  color: #6b7a8f;
  text-align: center;
  margin: 0 0 24px 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #1a2634;
}

.form-group input {
  padding: 10px 14px;
  border: 1px solid #dce3ec;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: #1a5a8c;
  box-shadow: 0 0 0 3px rgba(26, 90, 140, 0.1);
}

.btn-submit {
  padding: 12px;
  background: #1a5a8c;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  margin-top: 4px;
}

.btn-submit:hover {
  background: #134a73;
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e8edf4;
}

.auth-divider span {
  font-size: 13px;
  color: #6b7a8f;
}

.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #dce3ec;
  border-radius: 8px;
  background: #ffffff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  width: 100%;
  color: #1a2634;
}

.btn-oauth:hover {
  background: #f7f9fc;
  border-color: #b0c0d0;
}

.btn-oauth.google svg {
  flex-shrink: 0;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #6b7a8f;
}

.auth-footer a {
  color: #1a5a8c;
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.auth-error {
  background: #fee2e2;
  color: #991b1b;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
  display: none;
}

.auth-error.visible {
  display: block;
}

.auth-success {
  background: #e8f5ed;
  color: #1a6e3a;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
  display: none;
}

.auth-success.visible {
  display: block;
}

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

@media (max-width: 768px) {
  #auth-section {
    flex-direction: column;
    width: 100%;
  }

  .auth-buttons {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
  }

  .btn-login-header,
  .btn-register-header {
    flex: 1;
    justify-content: center;
    min-width: 120px;
  }

  .auth-user {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .user-greeting {
    font-size: 14px;
    padding: 4px 12px;
  }

  .auth-card {
    padding: 28px 20px;
  }

  .auth-card .logo h1 {
    font-size: 20px;
  }
}