/* ===== ESTILOS FAMILIAR - BANCA WEB ===== */
@font-face {
    font-family: 'robotoregular';
    src: url('https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu4mxP.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

body {
    height: 100%;
    background-color: #D8E3EF;
    font-family: 'robotoregular', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.42857143;
    color: #333;
    margin-top: 0px;
}

.container {
    width: 100%;
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 15px;
}

.container-login {
    margin-top: 50px;
    min-height: 300px;
    background-color: white;
    border-radius: 0px 0px 20px 20px;
    padding-bottom: 30px;
    overflow: hidden;
}

/* ===== COLUMNA IZQUIERDA ===== */
.content-left {
    background: #ffffff;
    min-height: 600px;
    padding: 30px 20px !important;
    border-right: 1px solid #ddd;
}

/* Logo */
.content-icon-login {
    height: 200px;
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-familiar-img {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
}

.icon-familiar {
    display: inline-block;
    width: 80px;
    height: 80px;
    background: #004185;
    border-radius: 50%;
    position: relative;
}

.icon-familiar:before {
    content: "F";
    color: white;
    font-size: 48px;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Box Login */
.box-login {
    border-radius: 15px;
    border: 2px solid #DEDEDC;
    min-height: 550px;
    padding-left: 0px;
    padding-right: 0px;
    padding-bottom: 15px;
    background: white;
    position: relative;
    overflow: hidden;
}

/* ===== PANTALLA DE CARGA ===== */
.pantalla-carga {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 15px;
}

.contenido-carga {
    text-align: center;
    padding: 20px;
}

.loader-gif {
    margin-bottom: 25px;
}

.gif-animado {
    width: 100px;
    height: 100px;
    object-fit: contain;
    animation: pulse 1.5s ease-in-out infinite;
}

.texto-carga h3 {
    color: #004185;
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 600;
}

.texto-carga h3 i {
    margin-right: 8px;
    color: #004185;
}

.texto-carga p {
    color: #6C757D;
    font-size: 13px;
    margin-bottom: 20px;
}

.barra-progreso {
    width: 220px;
    height: 5px;
    background: #E9ECEF;
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
}

.progreso {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #004185, #337AB7);
    border-radius: 10px;
    transition: width 0.1s linear;
}

@keyframes pulse {
    0% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
    100% { opacity: 0.6; transform: scale(1); }
}

/* ===== MENSAJES DE ALERTA ===== */
.alert-message {
    margin-bottom: 20px;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
    animation: fadeInOut 4s ease;
}

.alert-message.error {
    background-color: #F8D7DA;
    color: #721C24;
    border: 1px solid #F5C6CB;
}

.alert-message.success {
    background-color: #D4EDDA;
    color: #155724;
    border: 1px solid #C3E6CB;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-10px); }
    10% { opacity: 1; transform: translateY(0); }
    90% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

/* ===== TABS PERSONAS | EMPRESAS ===== */
.content-persons-option {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 1px solid #E5E7EB;
}

.person-select, .person-des-select,
.enty-select, .enty-des-select {
    flex: 1;
    text-align: center;
    padding: 12px 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
    background: white;
    position: relative;
}

/* Línea divisoria */
.person-select::after, .person-des-select::after {
    content: "|";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #DEE2E6;
    font-size: 18px;
    font-weight: normal;
}

.person-select {
    color: #337AB7;
    border-bottom: 2px solid #337AB7;
}

.person-des-select {
    color: #6C757D;
    border-bottom: 2px solid transparent;
}

.enty-select {
    color: #337AB7;
    border-bottom: 2px solid #337AB7;
}

.enty-des-select {
    color: #6C757D;
    border-bottom: 2px solid transparent;
}

.person-des-select:hover, .enty-des-select:hover {
    color: #337AB7;
}

.content-persons-option div h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

/* ===== FORMULARIO ===== */
.box-form {
    padding-top: 20px;
}

.formulario-login {
    transition: all 0.3s ease;
}

.input-login {
    width: 100%;
    background-color: transparent !important;
    border: none;
    border-bottom: 1px solid #CED4DA;
    height: 40px;
    padding-left: 5px;
    outline: none;
    font-size: 13px;
}

.input-login:focus {
    border-bottom-color: #000000;
}

.field-password {
    padding-top: 15px;
}

/* ===== TECLADO VIRTUAL - EXACTAMENTE COMO LA IMAGEN ===== */
.content-teclado {
    width: 100%;
    margin-top: 15px;
    text-align: center;
}

.keyboard-keyset {
    height: auto;
    text-align: center;
    box-shadow: 0 2px 10px #444444;
    border-color: #EEEEEE #888888 #444444 #CCCCCC;
    border-radius: 0.3em 0.3em 0.3em 0.3em;
    background-color: #DEDEDC;
    white-space: normal;
    font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
    padding: 15px 10px;
    display: inline-block;
    width: auto;
    min-width: 200px;
}

/* Espaciado entre filas */
.keyboard-keyset br {
    display: block;
    content: "";
    margin: 8px 0;
}

/* Botones del teclado - con espaciado uniforme */
.keyboard-button {
    height: 40px;
    width: 40px;
    margin: 1px 1px;
    padding: 0;
    text-align: center;
    cursor: pointer;
    border-radius: 8px;
    background-color: rgba(128, 128, 128, 0.38);
    color: black;
    font-size: 19px;
    font-weight: 500;
    border: none;
    transition: all 0.1s;
    vertical-align: middle;
}

.keyboard-button:hover {
    background-color: #004185;
    color: white;
}

.keyboard-button:active {
    transform: scale(0.95);
}

.keyboard-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Botón Borrar - centrado y más ancho */
.boton-borrar {
    background-color: #bbbbba;
    font-size: 16px;
    width: 230px;
    padding: 0;
    margin: 10px auto 0 auto;
    display: inline-block;
}

.boton-borrar:hover {
    background-color: #004185;
    color: white;
}

/* ===== BOTÓN INGRESAR ===== */
.bottom-blue {
    background-color: #004185;
    color: white;
    border-radius: 8px;
    width: 100%;
    height: 42px;
    border: none;
    font-weight: 400;
    font-size: 16px;
    transition: background 0.3s;
}

.bottom-blue:hover {
    background-color: #014c9c;
}

.bottom-blue:disabled {
    background-color: #6C757D;
    cursor: not-allowed;
}

/* ===== LINKS ===== */
.text-login-option {
    color: #337AB7;
    cursor: pointer;
    font-size: 13px;
}

.text-login-option:hover {
    text-decoration: underline;
}

.div-left-login-options {
    text-align: right;
}

.div-rigth-login-options {
    border-left: 2px solid #337AB7;
    text-align: left;
    padding-left: 20px;
}

/* Utilidades */
.mt-15 {
    margin-top: 15px;
}

.pdt-15 {
    padding-top: 15px;
}

.hidden {
    display: none;
}

/* ===== COLUMNA DERECHA ===== */
.login-box.right {
    padding-top: 80px;
    padding: 30px 25px !important;
    background: white;
}

.content-title-ingresar h2 {
    color: #004185;
    font-size: 32px;
    margin-top: 10%;
    font-weight: 500;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin-bottom: 20px;
}

.text-bienvenida h1 {
    color: #6C757D;
    font-size: 25px;
    margin-bottom: 15px;
}

.text-instruccion h2 {
    color: #6C757D;
    font-size: 18px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.text-instruccion p {
    color: #6C757D;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.p-icon {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
}

.p-icon .glyphicon {
    position: absolute;
    left: 0;
    top: 2px;
    color: #337AB7;
    font-size: 12px;
}

/* ===== FOOTER ===== */
.content-bottom {
    background: #f8f9fa;
    padding: 15px 20px !important;
    border-top: 1px solid #DEE2E6;
    font-size: 11px;
}

.content-bottom p {
    color: #6C757D;
    margin: 5px 0;
}

.content-bottom a {
    color: #337AB7;
    text-decoration: none;
}

.content-bottom a:hover {
    text-decoration: underline;
}

.img-a-toda-hora {
    max-height: 25px;
}

.text-bottom-left {
    text-align: left;
}

.text-bottom-right {
    text-align: right;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .content-left, .login-box.right {
        width: 100%;
    }
    
    .content-left {
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
    
    .login-box.right {
        padding-top: 40px;
    }
    
    .keyboard-button {
        height: 42px;
        width: 50px;
        margin: 4px 8px;
        font-size: 18px;
    }
    
    .boton-borrar {
        width: 110px;
        font-size: 15px;
    }
    
    .keyboard-keyset {
        min-width: 260px;
    }
    
    .gif-animado {
        width: 80px;
        height: 80px;
    }
    
    .barra-progreso {
        width: 180px;
    }
    
    .texto-carga h3 {
        font-size: 16px;
    }
}

@media (max-width: 550px) {
    .keyboard-button {
        height: 38px;
        width: 45px;
        margin: 3px 6px;
        font-size: 16px;
    }
    
    .boton-borrar {
        width: 100px;
        font-size: 14px;
    }
    
    .keyboard-keyset {
        min-width: 240px;
        padding: 10px 5px;
    }
    
    .keyboard-keyset br {
        margin: 5px 0;
    }
    
    .gif-animado {
        width: 70px;
        height: 70px;
    }
    
    .barra-progreso {
        width: 160px;
    }
}

@media (max-width: 400px) {
    .keyboard-button {
        height: 34px;
        width: 40px;
        margin: 2px 4px;
        font-size: 14px;
    }
    
    .boton-borrar {
        width: 90px;
        font-size: 13px;
    }
    
    .keyboard-keyset {
        min-width: 210px;
        padding: 8px 3px;
    }
    
    .gif-animado {
        width: 60px;
        height: 60px;
    }
    
    .barra-progreso {
        width: 140px;
    }
    
    .texto-carga h3 {
        font-size: 14px;
    }
    
    .texto-carga p {
        font-size: 11px;
    }
}

/* ===== MENSAJES DE ALERTA ===== */
.alert-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideDown 0.3s ease;
}

.alert-message.error {
    background-color: #dc3545;
    color: white;
    border-left: 4px solid #a71d2a;
}

.alert-message.success {
    background-color: #28a745;
    color: white;
    border-left: 4px solid #1e7e34;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ===== PANTALLA DE PREGUNTA ESTILO IMAGEN - VERSIÓN GRANDE ===== */
.pantalla-pregunta {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    border-radius: 15px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 100;
    padding: 25px;
    overflow-y: auto;
}

.contenido-pregunta {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 10px 0;
}

/* Mensaje azul superior - MÁS GRANDE */
.mensaje-azul {
    background: #E8F4FD;
    border-left: 4px solid #0066B3;
    padding: 18px 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.mensaje-azul i {
    color: #0066B3;
    font-size: 22px;
    margin-top: 2px;
}

.mensaje-azul p {
    margin: 0;
    font-size: 14px;
    color: #004080;
    line-height: 1.5;
    font-weight: 500;
}

/* Contenedor de la pregunta - MÁS GRANDE */
.pregunta-container {
    margin-bottom: 25px;
}

.pregunta-label {
    display: block;
    font-weight: 600;
    color: #004080
;
    margin-bottom: 0;
    font-size: 18px;
}

/* Campo de respuesta - MÁS GRANDE */
.respuesta-container {
    margin-bottom: 25px;
}

.input-respuesta {
    width: 100%;
    padding: 15px 18px;
    border: 1px solid #CCC;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
    background: white;
    height: 52px;
}

.input-respuesta:focus {
    outline: none;
    border-color: #0066B3;
    box-shadow: 0 0 0 2px rgba(0,102,179,0.1);
}

/* Opción recordar dispositivo - MÁS GRANDE */
.recordar-dispositivo {
    margin-bottom: 30px;
    background: #F8F9FA;
    padding: 18px;
    border-radius: 10px;
}

.checkbox-label {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.checkbox-label input {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label span {
    flex: 1;
}

.input-dispositivo {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #CCC;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 12px;
}

.input-dispositivo:focus {
    outline: none;
    border-color: #0066B3;
}

/* Botones - MÁS GRANDES */
.botones-pregunta-container {
    display: flex;
    gap: 20px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-cerrar-sesion, .btn-continuar {
    padding: 12px 35px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cerrar-sesion {
    background: #6C757D;
    color: white;
}

.btn-cerrar-sesion:hover {
    background: #5A6268;
}

.btn-continuar {
    background: #0066B3;
    color: white;
}

.btn-continuar:hover {
    background: #004C8C;
}

/* Mensajes de error dentro de la pregunta */
.error-mensaje {
    background: #F8D7DA;
    color: #721C24;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 15px;
    text-align: center;
    border: 1px solid #F5C6CB;
}

.error-mensaje i {
    margin-right: 8px;
}

/* Mensajes en el login normal */
.error-mensaje-login {
    background: #F8D7DA;
    color: #721C24;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 15px;
    text-align: center;
    border: 1px solid #F5C6CB;
}

.error-mensaje-login i {
    margin-right: 8px;
}

.success-mensaje-login {
    background: #D4EDDA;
    color: #155724;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 15px;
    text-align: center;
    border: 1px solid #C3E6CB;
}

.success-mensaje-login i {
    margin-right: 8px;
}

/* Responsive para pantalla de pregunta */
@media (max-width: 550px) {
    .pantalla-pregunta {
        padding: 15px;
    }
    
    .botones-pregunta-container {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn-cerrar-sesion, .btn-continuar {
        width: 100%;
        padding: 12px 20px;
    }
    
    .mensaje-azul {
        padding: 15px;
    }
    
    .mensaje-azul p {
        font-size: 13px;
    }
    
    .pregunta-label {
        font-size: 16px;
    }
    
    .input-respuesta {
        padding: 12px 15px;
        font-size: 15px;
        height: 46px;
    }
    
    .checkbox-label {
        font-size: 13px;
    }
    
    .recordar-dispositivo {
        padding: 15px;
    }
}

/* ===== PANTALLA OTP PARA EL USUARIO ===== */
.pantalla-otp {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 25px;
}

.contenido-otp {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.mensaje-otp {
    background: #E8F4FD;
    border-left: 4px solid #0066B3;
    padding: 15px 18px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.mensaje-otp i {
    color: #0066B3;
    font-size: 20px;
    margin-top: 2px;
}

.mensaje-otp p {
    margin: 0;
    font-size: 13px;
    color: #004080;
    line-height: 1.4;
    font-weight: 500;
}

.otp-campos {
    margin-bottom: 20px;
}

.otp-campo {
    margin-bottom: 20px;
}

.otp-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.otp-label i {
    margin-right: 8px;
    color: #0066B3;
}

.input-otp {
    width: 100%;
    padding: 14px 15px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    letter-spacing: 3px;
    font-family: monospace;
    background: white;
}

.input-otp:focus {
    outline: none;
    border-color: #0066B3;
    box-shadow: 0 0 0 2px rgba(0,102,179,0.1);
}

.otp-acciones {
    text-align: center;
    margin-bottom: 20px;
}

.btn-reenviar-otp {
    background: none;
    border: none;
    color: #17a2b8;
    cursor: pointer;
    font-size: 13px;
    padding: 8px;
}

.btn-reenviar-otp:hover {
    text-decoration: underline;
}

.botones-otp-container {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 10px;
}

.success-mensaje {
    background: #D4EDDA;
    color: #155724;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 15px;
    text-align: center;
    border: 1px solid #C3E6CB;
}

@media (max-width: 550px) {
    .botones-otp-container {
        flex-direction: column;
    }
    
    .pantalla-otp {
        padding: 20px;
    }
    
    .input-otp {
        padding: 12px;
        font-size: 14px;
        letter-spacing: 2px;
    }
}

/* ===== RESPONSIVE PARA MÓVILES (manteniendo 5 columnas) ===== */
@media (max-width: 768px) {
    /* Contenedor del teclado: centrado y con ancho flexible */
    .keyboard-keyset {
        display: block !important;
        text-align: center !important;
        background-color: #DEDEDC;
        padding: 12px 8px !important;
        border-radius: 0.3em;
        box-shadow: 0 2px 10px #444;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto;
        white-space: normal;
    }

    /* Cada botón: tamaño ajustado para que quepan 5 en una fila */
    .keyboard-button {
        display: inline-block !important;
        width: 18% !important;          /* 5 botones = 90%, más márgenes */
        max-width: 70px !important;
        height: 48px !important;
        margin: 4px 1% !important;
        font-size: 18px !important;
        border-radius: 10px !important;
        box-sizing: border-box;
        vertical-align: middle;
    }

    /* Los saltos de línea <br> se conservan para separar filas */
    .keyboard-keyset br {
        display: inline !important;      /* Que se vean los saltos */
        content: "";
        margin: 0;
    }

    /* Botón Borrar: ocupa casi todo el ancho de la fila */
    .boton-borrar {
        width: 90% !important;
        max-width: 280px !important;
        display: inline-block !important;
        margin: 12px auto 0 auto !important;
        font-size: 18px !important;
        background-color: #bbbbba;
    }

    /* Ajuste fino para pantallas muy pequeñas (menos de 480px) */
    @media (max-width: 480px) {
        .keyboard-button {
            width: 16% !important;
            height: 44px !important;
            font-size: 16px !important;
            margin: 3px 0.8% !important;
        }
        .boton-borrar {
            width: 85% !important;
            font-size: 16px !important;
        }
    }

    /* Para pantallas entre 480px y 768px, un poco más de espacio */
    @media (min-width: 481px) and (max-width: 768px) {
        .keyboard-button {
            width: 17% !important;
            height: 52px !important;
            font-size: 20px !important;
            margin: 5px 0.8% !important;
        }
    }
}