@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif; 
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px; /* Menos padding en móvil */
    background: #f5f5f5; /* opcional: da mejor contraste */
}

/* HEADER */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99;
    height: auto;
    background: transparent;
}

.logo img {
    max-width: 150px;
    height: auto;
}

/* WRAPPER */
.wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: #01193E;
    border: 2px solid rgba(255,255,255,.5);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 0 30px rgba(0,0,0,.5);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 30px 20px;
}

.wrapper .form-box {
    width: 100%;
}

/* TITULO */
.form-box h2{
    font-size: 1.5em;
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
}

/* CAMPOS */
.input-box {
    position: relative;
    width: 100%;
    height: 50px;
    border-bottom: 2px solid #fff;
    margin: 20px 0;
}

.input-box label {
    position: absolute;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
    font-size: 1em;
    color: #fff;
    font-weight: 500;
    pointer-events: none;
    transition: .5s;
}

.input-box input:focus~label,
.input-box input:valid~label{
    top: -5px;
    left: 5px;
    font-size: .8em;
}

.input-box input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1em;
    color: #fff;
    font-weight: 600;
    padding: 0 35px 0 5px;
}

.input-box .icon {
    position: absolute;
    right: 8px;
    font-size: 1.2em;
    color: #fff;
    line-height: 57px;
}

/* BOTÓN */
.btn {
    width: 100%;
    height: 45px;
    background: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    color: #333;
    font-weight: 500;
    transition: .3s;
}

.btn:hover{
    background: #009FE3;
    color: #fff;
}

/* LINKS */
.login-register {
    font-size: .9em;
    color: #fff;
    text-align: center;
    margin: 20px 0 10px;
}

.login-register p a{
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.login-register p a:hover {
    text-decoration: underline;
}

/* ERRORES */
.form-box.login form .error-msg {
    margin: 10px 0;
    display: block;
    background: crimson;
    color: #fff;
    border-radius: 5px;
    font-size: 0.9em;
    padding: 10px;
    text-align: center;
}

/* FOOTER FIJO */
div[style*="Desarrollado"] {
    font-size: 11px !important;
    text-align: center;
    width: 100%;
    position: fixed !important;
    bottom: 5px;
    left: 0;
}

/* 📱 MEDIA QUERIES */
@media (max-width: 768px) {
    body {
        padding: 20px 10px;
    }

    header {
        padding: 10px;
    }

    .logo img {
        max-width: 120px;
    }

    .wrapper {
        max-width: 90%;
        padding: 20px;
    }

    .form-box h2 {
        font-size: 1.3em;
    }
}

@media (max-width: 480px) {
    .wrapper {
        padding: 15px;
    }

    .form-box h2 {
        font-size: 1.2em;
    }

    .btn {
        height: 40px;
        font-size: 0.9em;
    }

    .login-register {
        font-size: 0.8em;
    }
}
