/* ==========================================================================
   ESTILO DEFINITIVO A PRUEBA DE FALLOS PARA EL LOGIN (IFRAME)
   ========================================================================== */

/* 1. Base del documento: Forzamos el pegado arriba y centrado horizontal */
body {
    background-color: #F7FAFC !important;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif !important;
    margin: 0 !important;
    padding: 20px 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
    box-sizing: border-box !important;
}

/* 2. Contenedor de la tarjeta: Forzamos la visibilidad de TODOS los textos internos */
.marco, form, body * {
    color: #4A5568 !important; /* Forzamos color gris oscuro corporativo para que NADA sea invisible o blanco */
    font-size: 14px;
    font-weight: 600;
}

/* Forzamos el diseño de la tarjeta contenedora */
.marco, form {
    background: #FFFFFF !important;
    border-radius: 16px !important;
    padding: 30px !important;
    width: 90% !important;
    max-width: 400px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05) !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    letter-spacing: 0.5px !important;
    line-height: 2 !important;
}

/* 3. Campos de Entrada (Inputs): Restablecemos su color de texto interno para que no hereden el gris */
input[type="text"], 
input[type="password"] {
    width: 100% !important;
    background: #FFFFFF !important;
    border: 1px solid #CBD5E0 !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    padding: 12px 16px !important;
    color: #2D3748 !important; /* Texto que escribe el usuario en gris oscuro/negro */
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02) !important;
    transition: all 0.2s ease !important;
    margin-top: 4px !important;
    margin-bottom: 20px !important;
    outline: none !important;
    box-sizing: border-box !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* Efecto azul al hacer clic en los inputs */
input[type="text"]:focus, 
input[type="password"]:focus {
    border-color: #3182CE !important;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.15) !important;
}

/* 4. Botón Principal: "Ingresar" (Forzamos texto blanco pasando por encima del selector universal anterior) */
button, input[type="submit"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #3182CE !important; /* Azul corporativo */
    color: #FFFFFF !important; /* Forzamos texto blanco puro */
    font-size: 15px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    width: 100% !important;
    height: auto !important;
    padding: 14px 24px !important;
    border: 1px solid #3182CE !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 6px rgba(49, 130, 206, 0.15) !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
    margin-top: 10px !important;
}

/* Hover del botón ingresar */
button:hover, input[type="submit"]:hover {
    background: #2B6CB0 !important;
    border-color: #2B6CB0 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 12px rgba(49, 130, 206, 0.2) !important;
    color: #FFFFFF !important;
}

button:active, input[type="submit"]:active {
    transform: translateY(0) !important;
}

/* 5. Botón Secundario: "Olvidé mi contraseña" (Volvemos a forzar el texto gris oscuro y fondo blanco) */
button:last-child {
    background: #FFFFFF !important;
    color: #4A5568 !important;
    border: 1px solid #CBD5E0 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}

button:last-child:hover {
    background: #F7FAFC !important;
    border-color: #A0AEC0 !important;
    color: #2D3748 !important;
}

/* ==========================================================================
   ESTRUCTURA ADAPTABLE MÓVIL
   ========================================================================== */
@media (max-width: 700px) {
    body {
        padding: 10px 0 !important;
    }

    .marco, form, body * {
        font-size: 13px;
    }

    input[type="text"], 
    input[type="password"] {
        font-size: 16px !important;
        padding: 12px !important;
    }

    button, input[type="submit"] {
        padding: 12px 20px !important;
        font-size: 14px !important;
    }
}