:root {
    --siesec-blue: #04349b;
    --siesec-yellow: #FFD700;
    --text-white: #FFFFFF;
    --text-grey: #e0e0e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #FFFFFF;
    min-height: 100vh;
    overflow-x: hidden;
}

.login-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Panel Izquierdo - Blanco */
.left-panel {
    flex: 1;
    background-color: #FFFFFF;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 10vh 50px 50px 50px;
}

.vertical-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 8vh;
    width: 100%;
}

.proportional-logo {
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.05));
    transition: all 0.3s ease;
}

.logo-mijp {
    max-height: 35vh;
    /* Aumentado para simetría */
    max-width: 90%;
}

.logo-cuadrantes {
    max-height: 18vh;
    max-width: 85%;
}

.logo-vida-paz {
    max-height: 15vh;
    max-width: 80%;
}

/* Panel Derecho - Azul OVSP */
.right-panel {
    flex: 1;
    background-color: var(--siesec-blue);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 50px;
    color: var(--text-white);
    position: relative;
    overflow: hidden;
}

.watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vh;
    height: 60vh;
    background-image: url("../images/ovsp.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.04;
    z-index: 0;
    pointer-events: none;
}

.login-box {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 550px;
    /* Aumentado de 450px */
    text-align: center;
}

.siesec-main-logo {
    max-height: 40vh;
    /* Reducido de 55vh para compactar diseño */
    width: auto;
    max-width: 100%;
    margin-bottom: 0;
    /* Sin margen inferior */
}

.right-panel h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 400;
}

.form-group {
    text-align: left;
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    border: none;
    background-color: #FFFFFF;
    font-size: 1rem;
    color: #333;
}

.form-group input::placeholder {
    color: #999;
}

.options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    /* Reducido de 30px */
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.forgot-password {
    color: var(--siesec-yellow);
    text-decoration: none;
    font-weight: 600;
}

.btn-acceso {
    width: 100%;
    padding: 15px;
    background-color: var(--siesec-yellow);
    color: var(--siesec-blue);
    border: none;
    border-radius: 0 !important;
    /* Totalmente rectangular */
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-bottom: 10px;
}

.btn-acceso:hover {
    background-color: #e6c200;
}

.footer-info {
    font-size: 0.7rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 15px;
    /* Reducido de 25px */
}

.footer-info p {
    margin-bottom: 5px;
}

.links-container {
    margin-bottom: 8px;
}

.site-link {
    color: var(--siesec-yellow);
    font-weight: 600;
}

.address-text {
    margin-bottom: 5px;
}

.copyright-text {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.support-container {
    margin-top: 15px;
    display: flex;
    justify-content: center;
}

.btn-whatsapp {
    background-color: #25D366;
    color: white !important;
    padding: 10px 20px;
    border-radius: 0 !important;
    /* Totalmente rectangular */
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-whatsapp:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.btn-whatsapp i {
    font-size: 1.2rem;
}

/* Estilos de Alertas */
.messages {
    width: 100%;
    margin-bottom: 20px;
}

.alert {
    padding: 10px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .left-panel {
        display: none;
    }

    .right-panel {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .watermark {
        display: none !important;
    }

    .right-panel {
        padding: 6vh 20px 20px 20px;
        justify-content: flex-start;
        min-height: 100vh;
        height: auto;
        overflow-y: auto;
        /* Permitimos scroll para evitar el amontonamiento */
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .login-box {
        padding: 0;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 10px;
        /* Separación saludable */
    }

    .siesec-main-logo {
        max-height: 25vh;
        /* Tamaño decente y legible */
        margin-bottom: -2vh;
        /* Ligera compensación, sin exagerar */
        object-fit: contain;
    }

    .right-panel h3 {
        font-size: 1.5rem;
        /* Tamaño legible */
        margin-bottom: 20px;
        margin-top: 10px;
    }

    .form-group {
        margin-bottom: 15px;
        /* Espacio entre campos */
    }

    .form-group label {
        margin-bottom: 5px;
        font-size: 0.9rem;
    }

    .form-group input {
        padding: 12px 15px;
        /* Área de contacto grande para dedos */
        font-size: 1rem;
        border-radius: 0 !important;
        /* Mantener rectangular */
    }

    .options-row {
        margin-bottom: 20px;
        font-size: 0.9rem;
    }

    .btn-acceso {
        padding: 12px;
        margin-bottom: 20px;
        font-size: 1.1rem;
        border-radius: 0 !important;
        /* Mantener rectangular */
    }

    .footer-info {
        font-size: 0.7rem;
        line-height: 1.4;
        margin-top: 20px;
        color: rgba(255, 255, 255, 0.7);
    }

    .footer-info p {
        margin-bottom: 5px;
    }

    .address-text {
        max-width: 100%;
        margin: 0 auto 5px auto;
    }

    .links-container {
        margin-bottom: 10px;
    }

    .support-container {
        margin-top: 10px;
        margin-bottom: 15px;
    }

    .btn-whatsapp {
        padding: 10px 15px;
        font-size: 0.9rem;
        border-radius: 0 !important;
    }
}


/* Modal de Sesión */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #FFFFFF;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-top: 5px solid var(--siesec-blue);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header i {
    font-size: 2.5rem;
    color: var(--siesec-blue);
    margin-bottom: 15px;
}

.modal-header h3 {
    color: var(--siesec-blue);
    margin-bottom: 15px;
}

.modal-body p {
    color: #444;
    margin-bottom: 20px;
    line-height: 1.5;
}

.timer-display {
    font-weight: 800;
    font-size: 1.2rem;
    color: #d32f2f;
    margin-bottom: 20px;
}

.btn-extend {
    width: 100%;
    padding: 12px;
    background-color: var(--siesec-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-extend:hover {
    background-color: #032a7e;
}