@charset "UTF-8";

/* =============================================
   LOGIN.CSS — FSIE Andalucía - Utilidades
   Diseño moderno, limpio y profesional
   Compatible con Bootstrap 4.4.1
   ============================================= */

/* ---------- Fuentes ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ---------- Reset base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f0f2f5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ---------- Fondo decorativo ---------- */
.login-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background:
    linear-gradient(135deg, #008f5b 0%, #006d46 40%, #125873 70%, #0a3d52 100%);
  overflow: hidden;
}

.login-bg::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 80%;
  height: 150%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.07) 0%, transparent 70%);
  animation: floatBg 20s ease-in-out infinite alternate;
}

.login-bg::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -20%;
  width: 60%;
  height: 120%;
  background: radial-gradient(ellipse, rgba(0,143,91,0.15) 0%, transparent 70%);
  animation: floatBg 25s ease-in-out infinite alternate-reverse;
}

@keyframes floatBg {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -20px) scale(1.05); }
}

/* ---------- Wrapper centrador ---------- */
.login-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
}

/* ---------- Tarjeta de login ---------- */
.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 20px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 2.5rem 2rem 1.5rem;
  text-align: center;
  animation: cardEntry 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardEntry {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ---------- Logo ---------- */
.login-logo {
  margin-bottom: 1.5rem;
}

.login-logo img {
  max-width: 200px;
  width: 65%;
  height: auto;
  transition: transform 0.3s ease;
}

.login-logo img:hover {
  transform: scale(1.03);
}

/* ---------- Título ---------- */
.login-title {
  margin-bottom: 2rem;
}

.utilidades-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #fff;
  background: linear-gradient(135deg, #008f5b 0%, #00b371 100%);
  padding: 0.4rem 1.4rem;
  border-radius: 50px;
  margin-bottom: 0.75rem;
}

.login-subtitle {
  font-size: 0.85rem;
  color: #7a8a99;
  margin: 0.75rem 0 0 0;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* ---------- Mensaje de error ---------- */
.login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: shakeError 0.4s ease-in-out;
}

.login-error i {
  color: #dc3545;
  font-size: 1rem;
  flex-shrink: 0;
  margin-right: 0;
}

.login-error span {
  color: #991b1b;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: left;
  line-height: 1.4;
}

@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

/* ---------- Zona de acción / Botón Google ---------- */
.login-action {
  margin-bottom: 1.5rem;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: #ffffff;
  border: 2px solid #e2e6ea;
  border-radius: 12px;
  color: #3c4043;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 0.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.btn-google:hover {
  background: #f8f9fa;
  border-color: #dadce0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  text-decoration: none;
  color: #3c4043;
}

.btn-google:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.btn-google-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-google-icon img {
  width: 22px;
  height: 22px;
}

.btn-google-text {
  line-height: 1;
}

/* ---------- Hint de acceso ---------- */
.login-hint {
  margin: 1rem 0 0 0;
  font-size: 0.78rem;
  color: #9ca3af;
  font-weight: 400;
}

.login-hint i {
  color: #008f5b;
  margin-right: 0.3rem;
  font-size: 0.72rem;
}

.login-hint strong {
  color: #6b7280;
  font-weight: 600;
}

/* ---------- Pie del card ---------- */
.login-footer {
  padding-top: 1.25rem;
  border-top: 1px solid #f0f0f0;
}

.login-footer span {
  font-size: 0.72rem;
  color: #b0b8c1;
  font-weight: 400;
  letter-spacing: 0.02em;
}

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

/* Móviles pequeños */
@media (max-width: 380px) {
  .login-card {
    padding: 2rem 1.25rem 1.25rem;
    border-radius: 16px;
  }

  .login-logo img {
    max-width: 160px;
  }

  .utilidades-badge {
    font-size: 0.7rem;
    padding: 0.35rem 1rem;
  }

  .btn-google {
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
  }
}

/* Móviles medianos */
@media (min-width: 381px) and (max-width: 575px) {
  .login-card {
    padding: 2.25rem 1.5rem 1.5rem;
  }
}

/* Tablets en vertical */
@media (min-width: 576px) and (max-width: 767px) {
  .login-card {
    max-width: 400px;
    padding: 2.5rem 2rem 1.5rem;
  }
}

/* Pantallas grandes: limitar ancho y centrar */
@media (min-width: 768px) {
  .login-card {
    max-width: 420px;
  }
}

/* Paisaje en móvil: ajustar padding vertical */
@media (max-height: 500px) and (orientation: landscape) {
  .login-wrapper {
    padding: 0.75rem;
    align-items: flex-start;
  }

  .login-card {
    margin-top: 0.5rem;
    padding: 1.25rem 1.5rem 1rem;
  }

  .login-logo {
    margin-bottom: 0.75rem;
  }

  .login-logo img {
    max-width: 140px;
  }

  .login-title {
    margin-bottom: 1rem;
  }
}

/* ---------- Utilidades heredadas (para compatibilidad) ---------- */
.utilidades {
  width: 100%;
  text-align: center;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  background-image: linear-gradient(to right, #008f5b, #00d4ff);
  background-size: 200% auto;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  transition: background-position 0.5s ease-in-out;
}

/* Clases de mensajes heredadas */
.message_success {
  background-color: #d1fae5;
  color: #065f46;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}

.message_error {
  background-color: #fef2f2;
  color: #991b1b;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}

.has-error {
  color: #dc3545 !important;
}

.has-success {
  color: #28a745 !important;
}

/* ---------- Accesibilidad: foco visible ---------- */
.btn-google:focus {
  outline: 3px solid rgba(0, 143, 91, 0.4);
  outline-offset: 2px;
}

/* ---------- Preferencia de reducción de movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  .login-card {
    animation: none;
  }

  .login-bg::before,
  .login-bg::after {
    animation: none;
  }

  .login-error {
    animation: none;
  }

  .btn-google {
    transition: none;
  }

  .login-logo img {
    transition: none;
  }
}