body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background: linear-gradient(159deg, #00909E, #292C35);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Contenedor del formulario */
.formulario {
    width: 400px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

/* Estilo del título con el logo */
.titulo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Espacio entre el texto y la imagen */
    padding-bottom: 20px;
    border-bottom: 1px solid silver;
}

.titulo img {
    width: 35px;
    height: auto;
}

/* Formulario */
.formulario form {
    padding: 0 20px;
    box-sizing: border-box;
}

.username {
    position: relative;
    border-bottom: 2px solid #adadad;
    margin: 30px 0;
}

.username input {
    width: 100%;
    padding: 0 35px 0 35px; /* espacio para íconos izquierdo y derecho */
    height: 40px;
    font-size: 16px;
    border: none;
    background: none;
    outline: none;
}

.username label {
    position: absolute;
    top: 50%;
    left: 35px;
    color: #adadad;
    transform: translateY(-50%);
    font-size: 16px;
    pointer-events: none;
    transition: .5s;
}

/* Línea de animación */
.username span::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #00909E;
    transition: .5s;
}

/* Animación al hacer foco */
.username input:focus ~ label {
    top: -5px;
    color: #00909E;
}

.username input:focus ~ span::before {
    width: 100%;
}

/* Ícono izquierdo */
.username .i {
    position: absolute;
    top: 50%;
    left: 8px;
    transform: translateY(-50%);
    color: #888;
    font-size: 16px;
}

/* Ícono del ojo derecho */
.toggle-password {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
    font-size: 16px;
}

.recordar {
    margin: -5px 0 20px 5px;
    color: blue;
    cursor: pointer;
}

.recordar:hover {
    text-decoration: underline;
}

/* Botón de envío */
input[type="submit"] {
    width: 100%;
    height: 50px;
    border: none;
    background: #00909E;
    font-size: 18px;
    color: white;
    cursor: pointer;
    outline: none;
    border-radius: 5px;
    transition: .3s;
}

input[type="submit"]:hover {
    background: #007580;
    transition: .3s;
}

/* Registro */
.registrarse {
    margin: 30px 0;
    text-align: center;
    font-size: 16px;
    color: black;
}

.registrarse a {
    color: blue;
    text-decoration: none;
}

.registrarse a:hover {
    text-decoration: underline;
}
.error {
            color: white;
            background-color: red;
            padding: 10px;
            text-align: center;
            margin-bottom: 10px;
            border-radius: 5px;
            display: none; /* Oculto por defecto */
        }
/* RESPONSIVE DESIGN */
@media (max-width: 480px) {
    .formulario {
        width: 90%;
        padding: 15px;
    }

    .titulo h1 {
        font-size: 18px;
    }

    .titulo img {
        width: 30px;
    }

    .username input {
        font-size: 14px;
        height: 35px;
        padding: 0 35px 0 35px;
    }

    input[type="submit"] {
        font-size: 16px;
        height: 45px;
    }

    .toggle-password {
        right: 8px;
        font-size: 14px;
    }
}

