/* static/CSS/gestionar_documentos/login/login.css */

:root {
    --azul: #1F2AA5;
    --azul-electrico: #2A36D4;
    --azul-claro: #4A5BFF;
    --azul-neon: #6A7BFF;
    --naranja: #FF8300;
    --naranja-claro: #FF9C33;
    --naranja-neon: #FFAA00;
    --blanco: #ffffff;
    --degradado-azul: linear-gradient(135deg, var(--azul) 0%, var(--azul-electrico) 50%, var(--azul-claro) 100%);
    --degradado-naranja: linear-gradient(135deg, var(--naranja) 0%, var(--naranja-neon) 50%, var(--naranja-claro) 100%);
    --sombra-suave: 0 8px 30px rgba(31, 42, 165, 0.15);
    --sombra-intensa: 0 20px 50px rgba(31, 42, 165, 0.3);
    --sombra-hover: 0 15px 40px rgba(31, 42, 165, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--degradado-azul);
    background-size: 400% 400%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    animation: gradientShift 8s ease infinite;
    position: relative;
    overflow: hidden;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Efectos de fondo animados */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 170, 0, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(106, 123, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.container.py-5 {
    padding: 2rem 1rem;
    position: relative;
    z-index: 2;
}

/* Card principal moderna */
.card {
    border: none;
    border-radius: 2.5rem;
    box-shadow: var(--sombra-intensa);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--sombra-hover);
}

.row.g-0 {
    margin: 0;
}

/* Imagen de login moderna */
.col-md-6.col-lg-5.d-none.d-md-block {
    position: relative;
    overflow: hidden;
}

.img-login {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9) contrast(1.1);
    transition: all 0.6s ease;
    position: relative;
}

.img-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--degradado-azul);
    opacity: 0.3;
    mix-blend-mode: overlay;
}

.col-md-6.col-lg-5.d-none.d-md-block:hover .img-login {
    transform: scale(1.05);
    filter: brightness(1) contrast(1.2);
}

/* Contenido del formulario */
.col-md-6.col-lg-7.d-flex.align-items-center {
    padding: 3rem 2.5rem;
}

.card-body {
    padding: 0 !important;
}

/* Header del formulario */
.d-flex.align-items-center.mb-4 {
    margin-bottom: 2.5rem !important;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid rgba(31, 42, 165, 0.1);
    position: relative;
}

.d-flex.align-items-center.mb-4::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 80px;
    height: 3px;
    background: var(--degradado-naranja);
    border-radius: 2px;
}

.fa-user-circle {
    color: var(--azul) !important;
    font-size: 3rem !important;
    filter: drop-shadow(0 4px 8px rgba(31, 42, 165, 0.3));
    transition: all 0.3s ease;
}

.d-flex.align-items-center.mb-4:hover .fa-user-circle {
    transform: scale(1.1) rotate(10deg);
    color: var(--naranja) !important;
}

.h1.fw-bold.mb-0 {
    color: var(--azul);
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--degradado-azul);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 20px rgba(31, 42, 165, 0.1);
}

/* Alert moderno */
.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 1.5rem;
    color: #dc3545;
    font-weight: 500;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.1);
    border-left: 4px solid #dc3545;
}

.alert-danger .btn-close {
    padding: 0.75rem;
    filter: none;
}

/* Formularios modernos */
.form-outline {
    position: relative;
    margin-bottom: 2rem;
}

.form-control {
    border: 2px solid rgba(31, 42, 165, 0.1);
    border-radius: 1.5rem;
    font-size: 1.1rem;
    padding: 1.25rem 1.5rem;
    background: rgba(248, 249, 250, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
    font-weight: 500;
    color: var(--azul);
}

.form-control::placeholder {
    color: rgba(31, 42, 165, 0.5);
    font-weight: 400;
}

.form-control:focus {
    border-color: var(--azul);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 
        0 0 0 3px rgba(31, 42, 165, 0.1),
        var(--sombra-suave);
    transform: translateY(-2px);
    color: var(--azul);
}

/* Efecto de label flotante */
.form-outline {
    position: relative;
}

.form-outline label {
    position: absolute;
    top: 50%;
    left: 1.5rem;
    transform: translateY(-50%);
    color: rgba(31, 42, 165, 0.6);
    font-weight: 500;
    transition: all 0.3s ease;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.9);
    padding: 0 0.5rem;
    border-radius: 0.5rem;
}

.form-control:focus + label,
.form-control:not(:placeholder-shown) + label {
    top: 0;
    left: 1rem;
    font-size: 0.8rem;
    color: var(--azul);
    background: var(--blanco);
    transform: translateY(-50%);
}

/* Botón de login moderno */
.btn-login {
    background: var(--degradado-naranja);
    color: var(--blanco);
    font-weight: 700;
    border-radius: 1.5rem;
    width: 100%;
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    border: none;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 
        0 6px 20px rgba(255, 131, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    transition: left 0.6s ease;
}

.btn-login:hover::before {
    left: 100%;
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--naranja-neon), var(--naranja));
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 12px 30px rgba(255, 131, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    color: var(--blanco);
}

.btn-login:active {
    transform: translateY(-1px) scale(1.01);
}

/* Efectos de partículas */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float-particle 6s ease-in-out infinite;
}

@keyframes float-particle {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg) scale(1); 
        opacity: 0.7;
    }
    50% { 
        transform: translateY(-20px) rotate(180deg) scale(1.2); 
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .col-md-6.col-lg-7.d-flex.align-items-center {
        padding: 2.5rem 2rem;
    }
    
    .h1.fw-bold.mb-0 {
        font-size: 2.2rem;
    }
}

@media (max-width: 767.98px) {
    .container.py-5 {
        padding: 1rem;
    }
    
    .card {
        border-radius: 2rem;
        margin: 1rem;
    }
    
    .col-md-6.col-lg-7.d-flex.align-items-center {
        padding: 2rem 1.5rem;
    }
    
    .h1.fw-bold.mb-0 {
        font-size: 2rem;
    }
    
    .fa-user-circle {
        font-size: 2.5rem !important;
    }
    
    .form-control {
        padding: 1.1rem 1.25rem;
        font-size: 1rem;
    }
    
    .btn-login {
        padding: 1.1rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 575.98px) {
    body {
        background: var(--degradado-azul);
        animation: none;
    }
    
    .card {
        border-radius: 1.5rem;
        margin: 0.5rem;
    }
    
    .col-md-6.col-lg-7.d-flex.align-items-center {
        padding: 1.5rem 1rem;
    }
    
    .h1.fw-bold.mb-0 {
        font-size: 1.8rem;
    }
    
    .d-flex.align-items-center.mb-4 {
        margin-bottom: 2rem !important;
    }
    
    .form-outline {
        margin-bottom: 1.5rem;
    }
}

/* Animaciones de entrada */
.card {
    animation: cardEntrance 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mejoras de accesibilidad */
.btn-login:focus,
.form-control:focus {
    outline: 3px solid var(--naranja-neon);
    outline-offset: 2px;
}

/* Estados de carga */
.btn-login.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}