/* =========================================
   ESTILOS GENERALES
   ========================================= */
body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #f3f3f3;
    height: 100vh;
    overflow: hidden; /* Evita el scroll en escritorio */
    display: flex;
    flex-direction: column;
}

.container {
    display: flex;
    flex: 1;
    flex-direction: row;
    height: 100%;
    width: 100%;
}

/* =========================================
   LADO IZQUIERDO (IMAGEN Y BURBUJAS)
   ========================================= */
.left-side {
    width: 65%; 
    background: url('/bancoema/images/55.png') no-repeat center center;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Overlay oscuro */
.left-side::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(20, 2, 63, 0.63);
    z-index: -1;
}

.left-side .welcome-message {
    z-index: 2;
    width: 100%;
    max-width: 1100px; /* Aumentado para permitir elementos más grandes */
}

/* Contenedor Principal de Burbujas */
.chat-bubbles {
    position: relative;
    width: 90%; /* Ancho aumentado */
    margin: 0 auto; /* Centrado horizontal */
    display: flex;
    flex-direction: column;
    padding-bottom: 30px;
    /* Margen izquierdo para centrar visualmente todo el bloque */
    margin-left: 5%; 
}

/* Título Azul (MÁS GRANDE) */
.chat-bubbles-title {
    background-color: #14023f;
    color: white;
    padding: 20px 30px; /* Padding aumentado */
    font-size: 2.2rem; /* Tamaño de fuente aumentado */
    font-weight: bold;
    text-align: center;
    border-radius: 20px;
    width: 100%; 
    margin: 0 auto 40px auto;
    box-shadow: 0px 6px 25px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

/* Burbuja Amarilla (MÁS GRANDE) */
.bubble {
    position: relative;
    padding: 40px 50px; /* Padding aumentado */
    background-color: #ffd700;
    border-radius: 35px;
    color: #280f63;
    font-size: 1.6rem; /* Tamaño de fuente aumentado */
    margin: 20px 0;
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.25);
    opacity: 0;
    animation: showBubble 1s forwards;
    display: flex;
    align-items: center;
    /* Espacio a la izquierda MUCHO MAYOR para que quepa la imagen gigante */
    margin-left: 250px; 
    min-height: 180px;
}

@keyframes showBubble {
    0% { opacity: 0; transform: translateX(100%); }
    100% { opacity: 1; transform: translateX(0); }
}

.bubble:after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 60px;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-top: 30px solid #ffd700;
}

/* IMAGEN DE LOS NIÑOS (GIGANTE) */
.bubble img {
    width: 550px; /* Tamaño GIGANTE */
    height: auto;
    position: absolute;
    left: -400px; /* Posicionada muy a la izquierda */
    top: 50%;
    transform: translateY(-50%); /* Centrada verticalmente */
    z-index: 15;
    filter: drop-shadow(0px 10px 10px rgba(0,0,0,0.4));
    margin: 0;
    border-radius: 0;
}

.bubble .text {
    line-height: 1.4;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

/* =========================================
   LADO DERECHO (LOGIN)
   ========================================= */
.right-side {
    width: 35%;
    background-color: #0f1c3f;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: #fff;
    text-align: center;
    position: relative;
    box-sizing: border-box;
}

.right-side * {
    font-family: 'Montserrat', sans-serif;
}

.content-wrapper {
    width: 100%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    margin-bottom: 60px;
}

.right-side h1 {
    font-size: 3rem;
    color: #fff;
    margin-bottom: 15px;
    margin-top: 0;
    font-weight: 800;
    letter-spacing: 1px;
}

.right-side .welcome-text {
    color: #d0dbe7;
    margin-bottom: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.separator-line {
    width: 100%;
    height: 4px;
    background-color: #f1c40f;
    border: none;
    margin: 0 auto 40px auto;
    border-radius: 2px;
}

/* Inputs */
.input-container {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

.input-container i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #0f1c3f !important;
    z-index: 20;
    font-size: 1.2rem;
}

.input-container input {
    width: 100%;
    padding: 16px 16px 16px 55px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    color: #0f1c3f;
    font-weight: 600;
    outline: none;
    box-sizing: border-box; /* Asegura que el padding no desborde */
}

.input-container input:focus {
    background-color: #f4f4f4;
}

/* Botón */
.btn-submit {
    width: 100%;
    padding: 16px;
    background-color: #f1c40f;
    color: #0f1c3f;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: #d4ac0d;
}

/* Switch */
.switch-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 30px;
    color: #ffffff;
    padding: 0 5px;
    box-sizing: border-box;
    font-size: 0.95rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #4e5d7a;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider { background-color: #f1c40f; }
input:checked + .slider:before { transform: translateX(20px); }

/* Links */
.recover-link {
    color: #f1c40f;
    text-decoration: none;
    font-size: 0.9rem;
    margin-top: 20px;
    display: inline-block;
    font-weight: 600;
    transition: color 0.3s;
}
.recover-link:hover { text-decoration: underline; color: #fff; }

/* Logos */
.logos-wrapper {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    z-index: 5;
}

.logos-bg {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logos-bg img {
    height: 70px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: 0.3s;
}

.logos-bg img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.logos-separator {
    width: 2px;
    height: 40px;
    background-color: rgba(255,255,255,0.2);
}

/* Mensajes de Error */
.error-message {
    background-color: #f44336;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-family: 'Montserrat', sans-serif;
}
.error-message.show { display: block; }
.close-btn { float: right; cursor: pointer; margin-left: 10px; font-weight: bold; }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    body { overflow: auto; }
    .container { flex-direction: column; }
    .left-side { display: none; }
    
    .right-side {
        width: 100%;
        height: 100vh;
        padding: 20px;
    }
    
    .right-side h1 { font-size: 2.2rem; }
    .content-wrapper { padding-bottom: 80px; }
    
    .logos-wrapper { bottom: 20px; }
    .logos-bg img { height: 40px; }
}