@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap");

:root {
    --white-color: #fff;
    --black-color: #000;
    --body-font: "Poppins", sans-serif;
    --h1-font-size: 2rem;
    --normal-font-size: 1rem;
    --small-font-size: .813rem;
    --error-bg: rgba(255, 0, 0, 0.8);
    --error-text: #fff;
}

* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

body, input, button {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
}

.login {
    position: relative;
    height: 100vh;
    display: grid;
    align-items: center;
    justify-content: center;
}

.login_bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.login_form {
    background-color: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 2rem 1.5rem;
    border-radius: 1rem;
    backdrop-filter: blur(10px);
    color: var(--white-color);
    width: 100%;
    max-width: 420px;
}

.login_img {
    display: block;
    margin: 0 auto 2.5rem;
    width: 80%;
}

.login_inputs {
    display: grid;
    row-gap: 1rem;
    margin-bottom: 1rem;
}

.login_box {
    display: grid;
    grid-template-columns: 1fr max-content;
    column-gap: .75rem;
    align-items: center;
    border: 2px solid rgba(255, 255, 255, 0.644);
    padding-inline: 1rem;
    border-radius: 6rem;
    transition: all 0.3s ease;
}

.login_input {
    width: 100%;
    background: transparent !important;
    border: none;
    outline: none;
    color: var(--white-color);
    padding: .8rem 0;
    -webkit-box-shadow: none !important;
    box-shadow: none !important;
}

.login_input::placeholder {
    color: rgb(238, 228, 228);
}

.login_input:focus {
    background: transparent !important;
    color: var(--white-color);
    outline: none;
    box-shadow: none;
}

.login_box:focus-within {
    border-color: #00ffcc;
    box-shadow: 0 0 8px rgba(0, 255, 204, 0.6);
}

.login_box i {
    font-size: 1.2rem;
    color: var(--white-color);
}

.login_button {
    width: 100%;
    padding: 1rem;
    background-color: var(--white-color);
    border-radius: 4rem;
    color: var(--black-color);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: 0.3s;
}

.login_button:hover {
    background-color:rgb(13, 118, 16);
    color: rgb(249, 245, 245);
}

.login_registrer {
    font-size: var(--small-font-size);
    text-align: center;
    margin-top: 1rem;
}

.login_registrer a {
    color: var(--white-color);
    font-weight: 500;
}

.login_error-popup {
    position: relative;
    margin: 0 auto 15px;
    background: rgba(255, 0, 0, 0.85);
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    animation: fadeOut 2.5s ease-in-out forwards;
    max-width: 350px;
}

/* aparece y luego se desvanece */
@keyframes fadeOut {
    0% { opacity: 0; transform: translateY(-10px); }
    15% { opacity: 1; transform: translateY(0); } 
    85% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); display: none; }
}

input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
    box-shadow: 0 0 0 1000px transparent inset !important;
    -webkit-text-fill-color: #fff !important; /* mantiene texto blanco */
    transition: background-color 9999s ease-in-out 0s;
}
