body {
    min-height: 100dvh;
    background: url('../../image/Cana-Dulce.png') center center/cover no-repeat fixed;
    font-family: 'Poppins', 'Roboto', Arial, sans-serif;
    margin: 0;
    padding: 0;
    /* overflow-y: hidden;
    color: #585353; */
}

.login-bg-full {

    display: flex;
    align-items: stretch;
    justify-content: space-between;
    /* evita que el texto del lado izquierdo se mueva con el scroll */
}

.login-panel-gradient {
    min-height: 70dvh;
    /* viewport real, estable en móviles */
    width: clamp(560px, 42vw, 760px);
    /* panel izquierdo de login */
    display: flex;
    flex-direction: column;
    align-items: center;
    /* justify-content: center; */
    /* background: linear-gradient(to left, rgba(255,255,255,0.98) 90%, rgba(255,255,255,0.7) 100%);
    box-shadow: -8px 0 32px rgba(31, 38, 135, 0.10); */
    position: relative;
    z-index: 2;
    padding: 0.2rem 1.5rem;
    order: 2;
    /* a la derecha */
    overflow-y: auto;
    /* scroll solo en el panel derecho */
}

/* Columna derecha: bloque de bienvenida sobre el fondo */
.welcome-right {
    /* flex: 1 1 auto; */
    /* display: flex; */
    align-items: center;
    /* justify-content: center; */
    padding: 2rem;
    /* position: relative; */
    order: 1;
    /* a la izquierda */
}

.welcome-card {
    color: #fff;
    text-align: left;
    max-width: 700px;
    padding: 1rem 1.5rem;
    /* background: linear-gradient(88deg, rgb(2 6 23 / 47%), rgb(2 6 23 / 47%)); */
    border-radius: 16px;
}

.welcome-card h1 {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    margin: 0 0 0.25rem 0;
    font-weight: 800;
}

.welcome-card p {
    font-size: clamp(0.9rem, 1.5vw, 1.05rem);
    margin: 0 0 0.5rem 0;
    opacity: 0.95;
}

.welcome-card .login-info-slogan {
    color: #ffffff;
    background: linear-gradient(88deg, rgb(2 6 23 / 47%), rgb(2 6 23 / 47%));
    border-radius: 5px;
    padding: 0 15px;
    display: inline-block;
}

.login-modern-title {
    color: var(--text-600);
}

.login-modern-footer {
    color: var(--text-600);
    font-size: 0.85rem;
}

/* Oscurecer ligeramente solo el lado izquierdo para legibilidad del texto */
.welcome-right::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.15) 60%, rgba(0, 0, 0, 0) 100%);
    pointer-events: none;
}

@media (max-width: 900px) {
    .login-bg-full {
        justify-content: center;
    }

    .login-panel-gradient {
        width: 100%;
        max-width: 98vw;
        padding: 1rem;
    }

    .welcome-card .login-info-slogan {
        font-size: 0.8rem;
    }

    /* .welcome-right {
        display: none;
    } */
}

@media (max-width: 600px) {

    .login-bg-full {
        display: grid;
    }

    .login-panel-gradient {
        padding: 0 0.2rem;
    }

    .login-info-block,
    .login-modern-card {
        max-width: 98vw;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .login-modern-logo {
        width: 70px;
    }

    .login-modern-title {
        font-size: 1.1rem;
    }

    .login-modern-desc {
        font-size: 0.95rem;
    }

    .welcome-right {
        padding: 0
    }

    .welcome-right::before {

        background: transparent;
    }

    .welcome-card {
        margin: 5px;
        background: linear-gradient(88deg, rgb(2 6 23 / 47%), rgb(2 6 23 / 47%));
    }

    .welcome-card h1 {
        font-size: 1rem;
    }

    .welcome-card p {
        font-size: 0.6rem;
    }
}

.login-info-block {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 1.5rem 0 1.2rem 0;
    border-radius: 18px;
    background: transparent;
    box-shadow: none;
    max-width: 100%;
    box-sizing: border-box;
}

.login-info-icon img {
    display: block;
    margin: 0 auto 1rem auto;
    width: 100%;
    max-width: 90px;
    height: auto;
}

.login-info-block h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #0056b3;
    margin-bottom: 0.7rem;
    letter-spacing: 1.5px;
}

.login-info-block p {
    color: #868686;
    font-size: 0.8rem;
    line-height: 1.6;
    margin: 0 0 1.1rem 0;
    font-weight: 500;
}

.login-info-slogan {
    display: block;
    margin-top: 1.2rem;
    color: #0056b3;
    font-style: italic;
    font-weight: 700;
    font-size: 1.08rem;
    letter-spacing: 0.5px;
}

@media (max-width: 600px) {
    .login-info-block h1 {
        font-size: 1.3rem;
    }

    .login-info-block p {
        font-size: 1rem;
    }

    .login-info-icon img {
        max-width: 40px;
    }
}

.login-modern-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 22px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.22);
    padding: 2.5rem 2rem 1.5rem 2rem;
    width: 100%;
    max-width: 400px;
    text-align: center;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    margin-bottom: 2rem;
}

/* Resto de estilos del formulario y botones igual que antes */
.login-form {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.form-group label {
    font-size: 0.98rem;
    margin-bottom: 0.3rem;
    color: #22223b;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    border: 1px solid #c9c9c9;
    font-size: 1rem;
    background: #f7f7fa;
    transition: border 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    border: 1.5px solid #0056b3;
    outline: none;
}

.login-btn {
    background: #0056b3;
    color: #fff;
    border-radius: 8px;
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    transition: background 0.2s, transform 0.2s;
    cursor: pointer;
}

.login-btn:hover {
    background: #003974;
    transform: translateY(-2px) scale(1.03);
}

.login-register-link {
    margin-top: 2rem;
}

.login-register-link .link {
    color: #0056b3;
    text-decoration: underline;
    font-weight: 500;
    cursor: pointer;
}

/* Estilos para el código de seguridad */
.codigo-input-container {
    position: relative;
}

.codigo-input {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
}

.codigo-help {
    display: block;
    font-size: 0.75rem;
    color: #666;
    margin-top: 4px;
    text-align: center;
}

/* Animación para campos deshabilitados */
.form-group input:disabled,
.form-group select:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

@media screen and (max-width: 600px) {
    .login-modern-card {
        padding: 1.5rem 1rem;
        width: 100%;
        max-width: 90vw;
    }

    .login-form {
        gap: 0.8rem;
    }

    .form-group input,
    .form-group select {
        font-size: 0.95rem;
        padding: 0.2rem 0.5rem;
    }

    .form-group label {
        font-size: 0.8rem;
        margin-bottom: 0.2rem;
    }

    .login-btn {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
    }



}

.popover-header {
    background-color: #00356a;
    color: #f8f9fa;
    font-weight: bold;
}

/* ============================================= */
/* ESTILOS PARA EL FOOTER MEJORADO */
/* ============================================= */

.main-footer {
    /* background: linear-gradient(135deg, var(--color-azul-comfa) 0%, var(--color-verde-comfa) 100%); */
    background: linear-gradient(180deg, var(--color-azul-comfa) 0%, var(--color-verde-comfa) 100%);
    color: var(--white);
    margin-top: auto;
    border-top: 3px solid var(--primary-color);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
}


.main-footer .container-fluid {
    max-width: 1400px;
}

.footer-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.footer-brand h6 {
    color: var(--white);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.footer-brand small {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
}

.footer-contact h6,
.footer-social h6,
.footer-links h6 {
    color: var(--primary-color);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-item small {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.7rem;
}

.contact-item i {
    font-size: 0.8rem;
    width: 16px;
}

.social-links {
    display: flex;
    align-items: center;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.social-link:hover {
    background: var(--primary-color);
    color: var(--color-azul-comfa);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.7rem;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.2);
    margin: 0;
}

.main-footer .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.75rem;
}

/* Responsividad del footer */
@media (max-width: 768px) {
    .main-footer .container-fluid {
        padding-left: 20px;
        padding-right: 20px;
    }

    .main-footer {
        position: relative;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1000;
    }

    .footer-brand {
        justify-content: center;
        text-align: center;
    }

    .footer-contact,
    .footer-social,
    .footer-links {
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .main-footer .text-md-end {
        text-align: center !important;
        margin-top: 10px;
    }
}