/*
 * /assets/css/login.css
 * Estilos para la pagina de inicio de sesion (login.php)
 * Incluye: fondo animado, burbujas, contenedor login, header, formulario, botones, footer
 */

/* ===== FONDO ANIMADO ===== */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #b6a0cc 100%);
    z-index: -2;
}

.bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.bubble {
    position: absolute;
    bottom: -100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    opacity: 0.5;
    animation: rise 15s infinite ease-in;
}

.bubble:nth-child(1) {
    width: 80px;
    height: 80px;
    left: 10%;
    animation-duration: 8s;
    animation-delay: 0s;
}

.bubble:nth-child(2) {
    width: 40px;
    height: 40px;
    left: 20%;
    animation-duration: 10s;
    animation-delay: 2s;
}

.bubble:nth-child(3) {
    width: 60px;
    height: 60px;
    left: 35%;
    animation-duration: 12s;
    animation-delay: 4s;
}

.bubble:nth-child(4) {
    width: 100px;
    height: 100px;
    left: 50%;
    animation-duration: 15s;
    animation-delay: 0s;
}

.bubble:nth-child(5) {
    width: 50px;
    height: 50px;
    left: 65%;
    animation-duration: 9s;
    animation-delay: 3s;
}

.bubble:nth-child(6) {
    width: 70px;
    height: 70px;
    left: 80%;
    animation-duration: 11s;
    animation-delay: 1s;
}

.bubble:nth-child(7) {
    width: 90px;
    height: 90px;
    left: 90%;
    animation-duration: 13s;
    animation-delay: 5s;
}

@keyframes rise {
    0% {
        bottom: -100px;
        transform: translateX(0);
    }
    50% {
        transform: translateX(100px);
    }
    100% {
        bottom: 110vh;
        transform: translateX(-100px);
    }
}

/* ===== LOGIN WRAPPER ===== */
.login-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== LOGIN HEADER ===== */
.login-header {
    background: linear-gradient(135deg, #0c66ea 0%, #0952c4 100%);
    color: white;
    padding: 30px 30px 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.login-header-content {
    position: relative;
    z-index: 1;
}

.logo-login {
    transform: scale(1.3);
    margin-bottom: 15px;
    display: inline-block;
}

.login-header h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.login-header p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

/* ===== LOGIN BODY ===== */
.login-body {
    padding: 30px 35px;
}

.form-floating {
    margin-bottom: 20px;
}

/* ===== PASSWORD TOGGLE ===== */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
    z-index: 10;
}

.password-toggle:hover {
    color: #0c66ea;
}

.password-toggle i {
    font-size: 1.2rem;
}

/* ===== CHECKBOX ===== */
.form-check {
    margin-bottom: 25px;
}

.form-check-input:checked {
    background-color: #0c66ea;
    border-color: #0c66ea;
}

.form-check-input:focus {
    border-color: #0c66ea;
    box-shadow: 0 0 0 0.25rem rgba(12, 102, 234, 0.25);
}

/* ===== BOTON LOGIN ===== */
.btn-login {
    background: #0c66ea;
    border: none;
    color: white;
    padding: 14px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-login:hover {
    background: #0952c4;
    color: white;
}

.btn-login:active {
    transform: translateY(0);
}

/* ===== ALERT ===== */
.login-body .alert {
    border-radius: 10px;
    border: none;
    margin-bottom: 25px;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* ===== LOGIN FOOTER ===== */
.login-footer {
    text-align: center;
    padding: 15px 35px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.login-footer a {
    color: #0c66ea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-footer a:hover {
    color: #0952c4;
    text-decoration: underline;
}

/* ===== LOADING ANIMATION ===== */
.btn-login.loading {
    pointer-events: none;
    position: relative;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== COPYRIGHT ===== */
.login-wrapper > .text-center {
    margin-top: 1rem !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 576px) {
    .login-body {
        padding: 30px 25px;
    }

    .login-header {
        padding: 30px 20px;
    }

    .logo-login {
        transform: scale(1.2);
    }

    .login-header h4 {
        font-size: 1.3rem;
    }
}

/* ===== LOGO OVERRIDES ===== */
.logo-login .logo-text-vot {
    color: #0c66ea !important;
}

.logo-login .logo-circle {
    background-color: #ffffff !important;
}

.logo-login .logo-text-cloud {
    color: #ffffff !important;
}

/*
 * /assets/css/login.css
 * Proposito: Estilos para la pagina de inicio de sesion con fondo animado y burbujas
 * Rol en el sistema: CSS especifico para la pagina login.php
 */
