/* ============================================================
   Sitravich — Login moderno
   ============================================================ */

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

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Roboto, 'Helvetica Neue', sans-serif;
}

/* ── Fondo animado ─────────────────────────────────────────── */
body {
  min-height: 100vh;
  background: linear-gradient(135deg, #0a0e27 0%, #0d2060 40%, #0a4fa8 70%, #0090cc 100%);
  background-size: 400% 400%;
  animation: gradientShift 12s ease infinite;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Partículas decorativas ────────────────────────────────── */
.bg-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  animation: floatUp linear infinite;
}

.particle:nth-child(1) { width: 80px;  height: 80px;  left: 10%; bottom: -100px; animation-duration: 18s; animation-delay: 0s; }
.particle:nth-child(2) { width: 120px; height: 120px; left: 30%; bottom: -150px; animation-duration: 22s; animation-delay: 3s; }
.particle:nth-child(3) { width: 60px;  height: 60px;  left: 55%; bottom: -80px;  animation-duration: 16s; animation-delay: 1s; }
.particle:nth-child(4) { width: 100px; height: 100px; left: 75%; bottom: -120px; animation-duration: 20s; animation-delay: 5s; }
.particle:nth-child(5) { width: 50px;  height: 50px;  left: 88%; bottom: -70px;  animation-duration: 14s; animation-delay: 2s; }

@keyframes floatUp {
  0%   { transform: translateY(0) rotate(0deg);   opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-110vh) rotate(360deg); opacity: 0; }
}

/* ── Contenedor central ────────────────────────────────────── */
.login-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 420px;
  padding: 1rem;
}

/* ── Card glassmorphism ────────────────────────────────────── */
.login-card {
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 24px;
  padding: 2.5rem 2.5rem 2rem;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.15) inset;
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

/* ── Logo ──────────────────────────────────────────────────── */
.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.logo-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d6efd, #0dcaf0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  box-shadow: 0 4px 20px rgba(13, 110, 253, 0.5);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(13, 110, 253, 0.5); }
  50%       { box-shadow: 0 4px 32px rgba(13, 110, 253, 0.8); }
}

/* ── Títulos ───────────────────────────────────────────────── */
.login-title {
  text-align: center;
  color: #ffffff;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 0.2rem;
}

.login-subtitle {
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.85rem;
  margin-bottom: 1.8rem;
  letter-spacing: 0.3px;
}

/* ── Alerta de error ───────────────────────────────────────── */
.alert-login {
  background: rgba(220, 53, 69, 0.20);
  border: 1px solid rgba(220, 53, 69, 0.45);
  color: #ff8a8a;
  border-radius: 10px;
  padding: 0.65rem 1rem;
  font-size: 0.85rem;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
}

/* ── Grupos de inputs ──────────────────────────────────────── */
.input-group-login {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1rem;
  pointer-events: none;
  z-index: 1;
  transition: color 0.2s;
}

.input-field {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  color: #ffffff;
  font-size: 0.95rem;
  padding: 0.75rem 2.8rem 0.75rem 2.6rem;
  outline: none;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}

.input-field::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.input-field:focus {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(13, 202, 240, 0.65);
  box-shadow: 0 0 0 3px rgba(13, 202, 240, 0.15);
}

.input-group-login:focus-within .input-icon {
  color: #0dcaf0;
}

/* Botón mostrar/ocultar contraseña */
.toggle-password {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.toggle-password:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* ── Botón de login ────────────────────────────────────────── */
.btn-login {
  width: 100%;
  padding: 0.8rem;
  margin-top: 0.5rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  box-shadow: 0 4px 18px rgba(13, 110, 253, 0.45);
}

.btn-login::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background 0.15s;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(13, 110, 253, 0.55);
}

.btn-login:hover::after {
  background: rgba(255, 255, 255, 0.07);
}

.btn-login:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(13, 110, 253, 0.4);
}

/* ── Footer ────────────────────────────────────────────────── */
.login-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  text-align: center;
  padding: 6px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
}

.login-footer a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.login-footer a:hover {
  color: #ffffff;
}

/* ── Autofill override (Chrome) ────────────────────────────── */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 100px rgba(13, 110, 253, 0.12) inset;
  -webkit-text-fill-color: #ffffff;
  caret-color: #ffffff;
  border-color: rgba(13, 202, 240, 0.45) !important;
  transition: background-color 5000s ease-in-out 0s;
}
