@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body{
    font-family: "Roboto", sans-serif;
    background-color: #e5e5f7;
    background-image:  radial-gradient(#3CB043 0.5px, transparent 0.5px), radial-gradient(#3CB043 0.5px, #e5e5f7 0.5px);
    background-size: 20px 20px;
    background-position: 0 0,10px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.sign-in-form{
    background-color: white;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 400px;
    padding: 1em 2em;
    border-radius: 10px;
    box-shadow: 0 5px 10px -5px rgb(0 0 0/ 30%);

}

img{
    height: 120px;
    width: 200px;
}

h2{
    font-size: 1.5rem;
    margin-bottom: .5em;
}

.form_container{
    margin-top: 3em;
    display: grid;
    gap: 2.5em;

}

.input-field{
    position: relative;
    --color: #5757577e;
}

.form_input{
    width: 100%;
    background: none;
    color: #706c6c;
    font-size: 1rem;
    padding: .6em .3em;
    border: none;
    outline: none;
    border-bottom: 1px solid var(--color);
    font-family: "Roboto", sans-serif;

}
.form_input:focus + .form_icon,
.form_input:focus + .form_icon + .form_label,
.form_input:not(:placeholder-shown) + .form_icon,
.form_input:not(:placeholder-shown) + .form_icon + .form_label{
    transform: translateY(-12px) scale( .7);
    transform-origin: left top;
    color: #3CB043;
}

.form_label{
    color: var(--color);
    cursor: pointer;
    position: absolute;
    top: 0;
    left: 30px;
    transform: translateY(10px);
    transition: transform .5s, color .3s;
}

.form_icon {
    color: var(--color);
    cursor: pointer;
    position: absolute;
    top: 0;
    left: 5px;
    transform: translateY(10px);
    transition: transform .5s, color .3s;

}

.btn{
    width: 100%;
    height: 30px;
    margin-top: 30px;
    background-color: #3cb044dc;
    border: none;
    border-radius: 17px;
    font-family: "Roboto", sans-serif;
    font-weight: 500;
}

.form_line{
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #3CB043; 
    transform:scale(0);
    transform:left bottom;
    transition: transform .4s;
        
}

.form_input:focus ~ .form_line,
.form_input:not(:placeholder-shown) ~ .form_line{
    transform: scale(1)
}
.error-message {
    color: #fff;
    background: #e74c3c; /* rojo alerta */
    padding: 12px 15px;
    margin: 10px 0 20px 0;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0px 2px 6px rgba(0,0,0,0.2);
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
