@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Nunito Sans', sans-serif;
}

:root {
    --red-ufpso: #bc0017;
    --text-color: #343a40;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #dee2e6;
}

html {
    display: grid;
    height: 100dvh;
}

body {
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background-color: var(--light-gray);
    font-size: 16px;
    color: var(--text-color);
}

/* LEFT SECTION STYLES */

.left {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

form {
    max-width: 500px;
    width: 100%;
    background-color: white;
    padding: 4rem 2rem;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.password-container {
    position: relative;
    width: 100%;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c757d;
    font-size: 18px;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--red-ufpso);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.welcome-text {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
    margin: 1rem 0 0.5rem 0;
}

.subtitle {
    color: #6c757d;
    font-size: 16px;
    margin: 0;
}

.form-group {
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease-out;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
    font-size: 14px;
}

.form-label i {
    color: var(--red-ufpso);
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--medium-gray);
    background-color: #ffffff;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: var(--red-ufpso);
    box-shadow: 0 0 0 3px rgba(188, 0, 23, 0.1);
    transform: translateY(-2px);
}

.form-input::placeholder {
    color: #adb5bd;
    font-size: 15px;
}

.forgot-password {
    text-align: center;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease-out 0.35s both;
}

.forgot-password a {
    color: var(--red-ufpso);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.forgot-password a:hover {
    color: #940f1f;
    text-decoration: none;
    transform: translateY(-1px);
}

.login-button {
    width: 100%;
    border: none;
    background: linear-gradient(135deg, var(--red-ufpso) 0%, #940f1f 100%);
    padding: 16px 24px;
    color: #ffffff;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.login-button:hover {
    background: linear-gradient(135deg, #940f1f 0%, #7a0c18 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(188, 0, 23, 0.3);
}

.login-button:active {
    transform: translateY(0);
}

form .logo {
    text-align: center;
}

.logo img {
    width: 20%;
    transition: all 0.3s ease;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.1));
}

.logo img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.15));
}

/* Animaciones de entrada */
.form-group:nth-child(1) {
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.form-group:nth-child(2) {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.form-group:nth-child(3) {
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.forgot-password {
    animation: fadeInUp 0.6s ease-out 0.35s both;
}

.login-button {
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

.separator {
    animation: fadeInUp 0.6s ease-out 0.5s both;
}

.social-login {
    animation: fadeInUp 0.6s ease-out 0.6s both;
}

.separator {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #dee2e6, transparent);
}

.separator span {
    background: rgba(255, 255, 255, 0.95);
    padding: 0 1rem;
    color: #6c757d;
    font-size: 13px;
    position: relative;
    z-index: 1;
    font-weight: 500;
}

.social-login {
    margin-bottom: 2rem;
}

.google-button {
    width: 100%;
    height: 52px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: #374151;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.google-button::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.5s;
}

.google-button:hover::before {
    left: 100%;
}

.google-button:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-color: #cbd5e0;
    color: #374151;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.google-button img {
    flex-shrink: 0;
    z-index: 1;
}

.google-button span {
    z-index: 1;
}

.login-footer {
    text-align: center;
}

.security-note {
    color: #6c757d;
    font-size: 12px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.security-note i {
    color: #28a745;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RIGHT SECTION STYLES */

.right {
    height: 100%;
    background: linear-gradient(135deg, #bc0017 0%, #940f1f 50%, #7a0c18 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.right::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(1deg);
    }
}

.right .logo-genesis {
    max-width: 420px;
    width: 100%;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
    animation: pulse 4s ease-in-out infinite;
    z-index: 1;
    position: relative;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.right .logo-ufpso {
    bottom: 20px;
    right: 20px;
    position: absolute;
    max-width: 240px;
    margin-right: 60px;
    width: 100%;
    opacity: 0.8;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.2));
    z-index: 1;
}

@media only screen and (max-width: 800px) {
    body {
        grid-template-columns: auto;
    }

    .left {
        order: 2;
        padding: 20px;
    }

    .right {
        order: 1;
        align-items: start;
        padding: 1rem;
        height: 120px;
    }

    .right .logo-ufpso {
        max-width: 160px;
    }
}

@media(max-height: 649px) {
    .right {

        height: 100%;
    }
}

/************ Sistema de espera CARGADOR  ************/
#div_loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 30000;
    opacity: 0.2;
}

#loading {
    position: fixed;
    top: 50%;
    left: 50%;
    margin-top: -25px;
    margin-left: -25px;
    z-index: 30001;
    display: none;
    opacity: 0.8;
    /* Asegurar que no hay filtros aplicados */
    filter: none;
}

/****************************************************/

@media only screen and (max-width: 800px) {
    .right {
        display: none;
    }

    .left {
        background: var(--red-ufpso);
    }
}