:root{
    --color-principal: #6366f1;
    --color-error: #ef4444;
    --color-exito: #22c55e;
    --color-fondo: #1f2937;
}

body{
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--color-fondo);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.contenedor-principal{
    background: rgba(225, 225, 225, 0.05);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 350px;
    color: white;
}

.datos-entrada{
    margin-bottom: 1.5rem;
    position: relative;
}

/* login integrado: no se requieren estilos de pestañas */

label{
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

input{
    width: 100%;
    padding: 10px;
    background: rgba(0,0,0,0.2);
    border: 2px solid transparent;
    border-radius: 5px;
    color: white;
    box-sizing: border-box;
    transition: 0.3s;
}

label{
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

input{
    width: 100%;
    padding: 10px;
    background: rgba(0,0,0,0.2);
    border: 2px;
    border-radius: 5px;
    color: white;
    box-sizing: border-box;
    transition: 0.3s;
}

/*El truco: estilos basados en la validez*/
input{
    border: 2px solid transparent;
}
input:focus{
    border-color: var(--color-principal);
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

input:invalid:not(:placeholder-shown){
    border-color: var(--color-error);
}

.mensaje-error{
    color: var(--color-error);
    font-size: 0.75rem;
    display: none;
}

input:invalid:not(:placeholder-shown)+.mensaje-error{
    display: block;
}

button{
    width: 100%;
    padding: 12px;
    background: var(--color-principal);
    border: none;
    color: white;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
}

.nivel-seguridad{
    height: 4px;
    width: 0%;
    background: var(--color-error);
    margin-top: 5px;
    transition: 0.5s;
}
.fa-eye, .fa-eye-slash{
    position: absolute;
    right: 12px;
    top: 42px;
    cursor: pointer;
    color: rgba(255,255,255,0.7);
    font-size: 18px;
}