/*
 * ARCHIVO: login.css
 * DESCRIPCIÓN: Sistema de acceso con diseño Glassmorphism y fondos animados premium.
 */

/* ==========================================================================
   1. VARIABLES Y RESET BASE
   ========================================================================== */
:root { --primary: #B91C1C; --primary-hover: #7F1D1D; --bg: #f8fafc; --text: #1e293b; --danger: #ef4444; }

body { 
    font-family: 'Poppins', sans-serif; margin: 0; height: 100vh; display: flex; align-items: center; 
    justify-content: center; overflow: hidden; background-color: #f1f5f9; position: relative; 
    background: radial-gradient(at 0% 0%, #e0e7ff 0%, transparent 50%), radial-gradient(at 100% 100%, #bfdbfe 0%, transparent 50%); 
}

/* ==========================================================================
   2. ELEMENTOS DECORATIVOS (FONDOS DINÁMICOS)
   ========================================================================== */
body::before, body::after { content: ""; position: absolute; width: 900px; height: 900px; border-radius: 50%; filter: blur(100px); z-index: -1; opacity: 0.5; animation: premiumFloat 30s infinite ease-in-out; }
body::before { background: radial-gradient(circle, #bfdbfe 0%, #3b82f6 100%); top: -10%; left: -10%; }
body::after { background: radial-gradient(circle, #e0e7ff 0%, #6366f1 100%); bottom: -10%; right: -10%; animation-delay: -15s; animation-direction: reverse; }

@keyframes premiumFloat { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(30vw, 20vh) scale(1.2); } 66% { transform: translate(-10vw, 40vh) scale(0.9); } }

/* ==========================================================================
   3. CONTENEDOR PRINCIPAL (GLASSMORPHISM)
   ========================================================================== */
.login-card { 
    background: rgba(255, 255, 255, 0.7); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); 
    padding: 40px; border-radius: 24px; border: 1px solid rgba(255, 255, 255, 0.8); 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1); width: 100%; max-width: 400px; 
    transform: scale(0.9); animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards; 
}

@keyframes fadeIn { from { opacity: 0; transform: scale(0.85) translateY(30px); } to { opacity: 1; transform: scale(0.9) translateY(0); } }

/* ==========================================================================
   4. ENCABEZADO Y LOGOTIPO
   ========================================================================== */
.header { text-align: center; margin-bottom: 30px; }
.header h1 { color: var(--text); font-size: 26px; margin: 0; font-weight: 700; letter-spacing: -0.5px; }
.header p { color: #64748b; font-size: 14px; margin-top: 5px; font-weight: 400; }
.login-logo { width: 350px; height: auto; margin-bottom: 20px; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.05)); animation: slideDown 0.8s ease-out forwards; }

@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* ==========================================================================
   5. ALERTAS Y NOTIFICACIONES
   ========================================================================== */
.alert { 
    padding: 12px 15px; background-color: rgba(254, 226, 226, 0.9); color: #b91c1c; border-radius: 12px; 
    font-size: 13px; margin-bottom: 20px; border: 1px solid rgba(254, 202, 202, 0.5); 
    display: flex; align-items: center; gap: 10px; animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both; 
}

@keyframes shake { 10%, 90% { transform: translate3d(-1px, 0, 0); } 20%, 80% { transform: translate3d(2px, 0, 0); } 30%, 50%, 70% { transform: translate3d(-4px, 0, 0); } 40%, 60% { transform: translate3d(4px, 0, 0); } }

/* ==========================================================================
   6. FORMULARIO Y CAMPOS DE ENTRADA
   ========================================================================== */
.form-group { margin-bottom: 22px; position: relative; }
label { display: block; font-size: 13px; color: #475569; margin-bottom: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

input { width: 100%; padding: 13px 16px; border: 2px solid #f1f5f9; background: rgba(255, 255, 255, 0.9); border-radius: 12px; font-size: 15px; transition: all 0.25s ease; box-sizing: border-box; }
input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1); transform: translateY(-2px); }

.password-wrapper { position: relative; }
.toggle-password { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); cursor: pointer; color: #94a3b8; padding: 5px; transition: color 0.3s; }
.toggle-password:hover { color: var(--primary); }

/* ==========================================================================
   7. BOTÓN DE ACCIÓN (EFECTO SWEEP)
   ========================================================================== */
button { 
    width: 100%; padding: 15px; background: var(--primary); color: white; border: none; border-radius: 12px; 
    font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    margin-top: 10px; position: relative; overflow: hidden; 
}
button:hover { background: var(--primary-hover); transform: translateY(-2px); box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.4); }
button:active { transform: translateY(0); }
button::after { content: ""; position: absolute; top: -50%; left: -60%; width: 20%; height: 200%; background: rgba(255, 255, 255, 0.2); transform: rotate(30deg); animation: lightSweep 4s infinite; }

@keyframes lightSweep { 0% { left: -60%; } 20% { left: 120%; } 100% { left: 120%; } }

/* ==========================================================================
   8. PIE DE PÁGINA (LINKS)
   ========================================================================== */
.footer { margin-top: 30px; text-align: center; font-size: 13px; color: #64748b; line-height: 1.6; }
.footer a { color: var(--primary); text-decoration: none; font-weight: 600; transition: color 0.2s; }
.footer a:hover { color: var(--primary-hover); text-decoration: underline; }