/* ===== SOBREESCRIBIR VARIABLES DE BOOTSTRAP ===== */
:root {
    --bs-primary: #22c55e !important;
    --bs-primary-rgb: 34, 197, 94 !important;
    --bs-link-color: #16a34a;
    --bs-link-hover-color: #15803d;
}

/* ===== RESET BASE ===== */
html,
body {
    height: 100%;
    margin: 0;
    padding: 0 !important;
    overflow: hidden;
}

/* ===== PÁGINA INTERNA (con sidebar) ===== */
.page-content {
    padding: 1.5rem !important;
    margin: 0 !important;
    height: 100%;
}

/* ===== LOGIN ===== */
.login-page {
    height: 100vh;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 40%, #bbf7d0 100%);
}

.login-page .row {
    height: 100%;
    margin: 0;
}

/* ===== IMAGEN LATERAL ===== */
.login-page::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 70%;
    height: 90%;
    background-image: url("/static/img/fondo4.png");
    background-size: cover;
    background-position: center -10%;
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.85) 65%, rgba(0, 0, 0, 0) 100%),
        linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.85) 20%, rgba(0, 0, 0, 0.85) 80%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-composite: destination-in;
    mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.85) 65%, rgba(0, 0, 0, 0) 100%),
        linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.85) 20%, rgba(0, 0, 0, 0.85) 80%, rgba(0, 0, 0, 0) 100%);
    mask-composite: intersect;
    filter: brightness(1.25) contrast(1.15) saturate(1.15);
}

/* ===== ELECTRONES ===== */
.login-page::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 60%;
    background-image: radial-gradient(circle, rgba(34, 197, 94, 0.6) 2px, transparent 2px);
    background-size: 35px 35px;
    animation: electronMove 18s linear infinite, electronFade 3.5s ease-in-out infinite;
    mask-image: linear-gradient(to bottom, black 60%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent);
    pointer-events: none;
    z-index: 0;
}

/* ===== ENERGÍA ===== */
.energy-wave {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: radial-gradient(circle at 20% 20%, rgba(34, 197, 94, 0.25), transparent 60%),
        radial-gradient(circle at 80% 10%, rgba(34, 197, 94, 0.2), transparent 60%);
    animation: energyPulse 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes electronMove {
    0% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(-80px, 20px);
    }

    50% {
        transform: translate(-160px, -10px);
    }

    75% {
        transform: translate(-240px, 15px);
    }

    100% {
        transform: translate(-320px, 0);
    }
}

@keyframes electronFade {
    0% {
        opacity: 0.15;
    }

    25% {
        opacity: 0.8;
    }

    50% {
        opacity: 0.3;
    }

    75% {
        opacity: 1;
    }

    100% {
        opacity: 0.2;
    }
}

@keyframes energyPulse {
    0% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }

    100% {
        opacity: 0.3;
        transform: scale(1);
    }
}

/* ===== ANIMACIÓN MANO ===== */
.wave-hand {
    display: inline-block;
    animation: waveHand 1.5s ease-in-out infinite;
    transform-origin: 70% 70%;
}

@keyframes waveHand {
    0% {
        transform: rotate(0deg);
    }

    15% {
        transform: rotate(14deg);
    }

    30% {
        transform: rotate(-8deg);
    }

    45% {
        transform: rotate(14deg);
    }

    60% {
        transform: rotate(-4deg);
    }

    75% {
        transform: rotate(10deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* ===== LOGOS INSTITUCIONALES ===== */
.logos-institucionales {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    z-index: 10;
}

.logo-escudo {
    height: 180px;
    width: auto;
    opacity: 0.9;
}

.logo-facultad {
    height: 120px;
    width: auto;
    opacity: 0.9;
}

.frase-institucional {
    position: absolute;
    bottom: 40px;
    right: 28%;
    font-family: 'Caudex', serif;
    font-size: 30px;
    font-weight: 800;
    color: #14532d;
    text-align: right;
    z-index: 10;
}

/* ===== CARD ===== */
.card {
    height: auto;
    margin: 0;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

/* ===== INPUTS ===== */
input {
    border-radius: 8px !important;
    padding: 10px !important;
}

/* ===== BOTÓN ===== */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:first-child:active,
.btn-primary:focus-visible {
    background-color: #22c55e !important;
    border-color: #22c55e !important;
    color: white !important;
    box-shadow: none !important;
}

.btn-primary:hover,
.btn-primary:active,
.btn-primary:first-child:active {
    background-color: #16a34a !important;
    border-color: #16a34a !important;
}

/* ===== LINK REGISTRO ===== */
.register-link {
    color: #16a34a;
    font-weight: 600;
    text-decoration: none;
}

.register-link:hover {
    color: #15803d;
    text-decoration: underline;
}

/* ===== ICONOS ===== */
.input-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-40%);
    width: 35px;
    height: 35px;
    pointer-events: none;
    z-index: 3;
}

.with-icon {
    padding-left: 55px !important;
    background-color: #fff;
}