/* =============================================
   login.css
   Diseño de pantalla de login (glassmorphism + fondo animado)
   No reemplazable por Bootstrap — diseño completamente custom
   ============================================= */

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

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1f2e 0%, #2c3e50 50%, #1a2a3a 100%);
    position: relative;
    overflow: hidden;
}

/* Fondo animado con gradientes radiales */
body::before {
    content: '';
    position: fixed;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(52,152,219,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(155,89,182,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(26,188,156,0.05) 0%, transparent 50%);
    animation: bgPulse 8s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes bgPulse {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(2%, 2%) scale(1.03); }
}

/* Grid decorativo de fondo */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

/* Orbs decorativos */
.orb { position: fixed; border-radius: 50%; pointer-events: none; z-index: 1; filter: blur(60px); opacity: 0.12; animation: orbFloat 10s ease-in-out infinite alternate; }
.orb-1 { width: 300px; height: 300px; background: #3498db; top: -80px; right: -80px; }
.orb-2 { width: 200px; height: 200px; background: #9b59b6; bottom: -50px; left: -50px; animation-delay: -4s; }

@keyframes orbFloat {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(20px, 15px) scale(1.1); }
}

/* Tarjeta principal (glassmorphism) */
.login-card {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    margin: 1.5rem;
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 2.5rem 2.25rem;
    box-shadow:
        0 25px 50px rgba(0,0,0,0.4),
        0 0 0 1px rgba(255,255,255,0.05),
        inset 0 1px 0 rgba(255,255,255,0.08);
    animation: cardIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

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

/* Logo */
.login-logo {
    display: flex; align-items: center; justify-content: center;
    width: 64px; height: 64px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 16px;
    margin: 0 auto 1.5rem;
    font-size: 1.8rem;
    box-shadow: 0 8px 24px rgba(52,152,219,0.35);
    animation: logoPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes logoPop {
    from { transform: scale(0.5); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.login-title    { color: #fff; font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: 0.25rem; letter-spacing: -0.02em; }
.login-subtitle { color: rgba(255,255,255,0.45); font-size: 0.85rem; text-align: center; margin-bottom: 2rem; font-weight: 400; }

/* Campos */
.form-label { color: rgba(255,255,255,0.7); font-size: 0.82rem; font-weight: 500; margin-bottom: 0.4rem; letter-spacing: 0.02em; }

.input-wrapper { position: relative; margin-bottom: 1.1rem; }

.input-icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: rgba(255,255,255,0.3); font-size: 1rem; pointer-events: none; transition: color 0.25s;
}
.input-wrapper:focus-within .input-icon { color: #3498db; }

.form-control {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: #fff;
    padding: 0.7rem 1rem 0.7rem 2.6rem;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.25s ease;
    width: 100%;
}
.form-control::placeholder   { color: rgba(255,255,255,0.2); }
.form-control:focus {
    outline: none;
    background: rgba(255,255,255,0.09);
    border-color: rgba(52,152,219,0.6);
    box-shadow: 0 0 0 3px rgba(52,152,219,0.15);
    color: #fff;
}

/* Toggle contraseña */
.toggle-password {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: rgba(255,255,255,0.3);
    cursor: pointer; padding: 4px; font-size: 1rem; transition: color 0.2s; line-height: 1;
}
.toggle-password:hover  { color: rgba(255,255,255,0.7); }
.password-wrapper .form-control { padding-right: 2.6rem; }

/* Fila recordar / olvidé */
.remember-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.form-check-label { color: rgba(255,255,255,0.5); font-size: 0.82rem; cursor: pointer; margin-left: 0.4rem; }
.form-check-input { background-color: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); cursor: pointer; }
.form-check-input:checked { background-color: #3498db; border-color: #3498db; }
.forgot-link { color: rgba(52,152,219,0.8); font-size: 0.82rem; text-decoration: none; transition: color 0.2s; }
.forgot-link:hover { color: #3498db; }

/* Botón login */
.btn-login {
    width: 100%; padding: 0.75rem;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: none; border-radius: 10px;
    color: #fff; font-family: 'Inter', sans-serif;
    font-size: 0.92rem; font-weight: 600; letter-spacing: 0.01em;
    cursor: pointer; transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(52,152,219,0.3);
    position: relative; overflow: hidden;
}
.btn-login::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 60%);
    opacity: 0; transition: opacity 0.25s;
}
.btn-login:hover          { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(52,152,219,0.45); }
.btn-login:hover::before  { opacity: 1; }
.btn-login:active         { transform: translateY(0); }

/* Divisor */
.divider { display: flex; align-items: center; gap: 0.75rem; margin: 1.5rem 0 1rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.08); }
.divider span { color: rgba(255,255,255,0.25); font-size: 0.75rem; white-space: nowrap; }

/* Badge beta */
.beta-badge {
    display: inline-flex; align-items: center; gap: 0.3rem;
    background: rgba(241,196,15,0.12); border: 1px solid rgba(241,196,15,0.25);
    color: rgba(241,196,15,0.8); font-size: 0.72rem; font-weight: 600;
    padding: 0.3rem 0.7rem; border-radius: 20px;
    text-align: center; width: 100%; justify-content: center; letter-spacing: 0.04em;
}

/* Alerta de error */
.alert-login {
    background: rgba(231,76,60,0.12); border: 1px solid rgba(231,76,60,0.3);
    color: rgba(255,120,100,0.9); border-radius: 10px;
    padding: 0.65rem 1rem; font-size: 0.83rem; margin-bottom: 1.25rem;
    display: flex; align-items: center; gap: 0.5rem;
}

/* Footer */
.login-footer { margin-top: 1.75rem; text-align: center; color: rgba(255,255,255,0.2); font-size: 0.75rem; }
