/* Fondo azul oscuro */
body {
    background: radial-gradient(1200px 700px at -5% -10%, #1a1f42 0%, #0e1224 40%, #0e1224 100%) fixed;
    font-family: Arial, sans-serif;
    margin: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-container {
    display: flex;
    width: 80%;
    height: 70%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 15px rgba(40, 138, 237, 1);
}

/* Parte izquierda (azul oscuro) */
.left-side {
    background: radial-gradient(1200px 700px at -5% -10%, #1a1f42 0%, #0e1224 40%, #02061b 100%) fixed;
    width: 75%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

    .left-side img {
        max-width: 80%;
        height: auto;
    }

/* Parte derecha (blanco) */
.right-side {
    width: 25%;
    background-color: white;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

    .right-side h3 {
        color: #1e3c72;
    }

/* Estilos de los formularios */
.form-control {
    border-radius: 10px;
    margin-bottom: 20px;
    padding: 10px;
}

.btn-primary {
    width: 100%;
    background-color: #1e3c72;
    border-color: #1e3c72;
    border-radius: 10px;
    padding: 10px;
}

    .btn-primary:hover {
        background-color: #173b63;
        border-color: #173b63;
    }

/* Botón Ingresar: más presencia + estado cargando */
.btn-ingresar {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    color: #fff !important;
    background: linear-gradient(135deg, #2b6cb0 0%, #1e3c72 55%, #152a52 100%) !important;
    box-shadow:
        0 8px 18px rgba(30, 60, 114, .35),
        inset 0 1px 0 rgba(255, 255, 255, .22);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.btn-ingresar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,.28) 48%, transparent 70%);
    transform: translateX(-120%);
    pointer-events: none;
}

.btn-ingresar:hover:not(:disabled) {
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow:
        0 12px 24px rgba(30, 60, 114, .42),
        inset 0 1px 0 rgba(255, 255, 255, .28);
}

.btn-ingresar:hover:not(:disabled)::before {
    animation: btnIngresarShine 1.1s ease;
}

.btn-ingresar:active:not(:disabled) {
    transform: translateY(0);
    filter: brightness(.98);
}

.btn-ingresar:disabled,
.btn-ingresar.is-loading {
    cursor: wait;
    transform: none;
    filter: none;
    opacity: 1;
    background: linear-gradient(135deg, #3b82c4 0%, #1e3c72 55%, #152a52 100%) !important;
    box-shadow:
        0 0 0 2px rgba(59, 130, 246, .25),
        0 10px 22px rgba(30, 60, 114, .4);
}

.btn-ingresar.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent);
    animation: btnIngresarPulse 1.2s ease-in-out infinite;
    pointer-events: none;
}

.btn-ingresar-label,
.btn-ingresar-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-ingresar.is-loading .btn-ingresar-label { display: none; }
.btn-ingresar:not(.is-loading) .btn-ingresar-loading { display: none !important; }
.btn-ingresar.is-loading .btn-ingresar-loading { display: inline-flex !important; }

.btn-ingresar-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    animation: btnIngresarSpin .7s linear infinite;
}

@keyframes btnIngresarShine {
    to { transform: translateX(120%); }
}

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

@keyframes btnIngresarPulse {
    0%, 100% { opacity: .35; }
    50% { opacity: .85; }
}

/* Responsividad */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        height: auto;
    }

    .left-side, .right-side {
        width: 100%;
    }
}

.input-group {
    display: flex;
    align-items: center;
}


    .input-group .input-group-text {
        background: transparent;
        border: none;
        padding: 0;
    }

    .input-group .fa {
        font-size: 1.2rem;
        color: #333;
        cursor: pointer;
    }



.marca-agua-svg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background-image: url("data:image/svg+xml;utf8, <svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'> <text x='150' y='150' font-size='20' fill='yellow' text-anchor='middle' transform='rotate(-45 150 150)'> ⚠ AMBIENTE TEST ⚠ </text> </svg>");
    background-repeat: repeat;
    opacity: 0.1;
    animation: respirar 4s ease-in-out infinite;
}

@keyframes respirar {
    0%, 100% {
        opacity: 0.1;
    }

    50% {
        opacity: 0.3;
    }
}
