body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #93a3a3;
    margin: 0;
}

.login-wrap {
    position: relative;
    margin: 0 auto;
    background: #ecf0f1;
    width: 350px;
    border-radius: 5px;
    box-shadow: 3px 3px 10px #333;
    padding: 15px;
}
.login-wrap h2 {
    text-align: center;
    font-weight: 200;
    font-size: 2em;
    margin-top: 10px;
    color: #34495e;
}
.login-wrap .form {
    padding-top: 20px;
}
.login-wrap .form input[type="text"],
.login-wrap .form input[type="password"],
.login-wrap .form button {
    width: 80%;
    margin-left: 10%;
    margin-bottom: 25px;
    height: 40px;
    border-radius: 5px;
    outline: 0;
    -moz-outline-style: none;
}
.login-wrap .form input[type="text"],
.login-wrap .form input[type="password"] {
    border: 1px solid #bbb;
    padding: 0 0 0 10px;
    font-size: 14px;
}
.login-wrap .form input[type="text"]:focus,
.login-wrap .form input[type="password"]:focus {
    border: 1px solid #3498db;
}
.login-wrap .form button {
    background: #e74c3c;
    border: none;
    color: white;
    font-size: 18px;
    font-weight: 200;
    cursor: pointer;
    transition: box-shadow .4s ease;
}
.login-wrap .form button:hover {
    box-shadow: 1px 1px 5px #555;
}
.login-wrap .form button:active {
    box-shadow: 1px 1px 7px #222;
}
.login-wrap:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to right,
        #27ae60 0%, #27ae60 20%,
        #8e44ad 20%, #8e44ad 40%,
        #3498db 40%, #3498db 60%,
        #e74c3c 60%, #e74c3c 80%,
        #f1c40f 80%, #f1c40f 100%
    );
    height: 5px;
    border-radius: 5px 5px 0 0;
}

/* Mensaje de error y éxito */
.alert {
    padding: 12px 15px;
    border-radius: 5px;
    margin: 0 10% 15px 10%;
    font-size: 0.9rem;
    text-align: center;
}

.alert-danger {
    background: #fdf2f2;
    color: #c0392b;
    border: 1px solid #e74c3c;
}

.alert-success {
    background: #f0fff4;
    color: #27ae60;
    border: 1px solid #27ae60;
}

/* ==================== RESPONSIVE LOGIN.CSS ==================== */

@media (max-width: 480px) {
    body {
        padding: 0;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background: #93a3a3;
    }
    .login-wrap {
        width: 100%;
        max-width: 350px;
        box-sizing: border-box;
        padding: 15px 10px;
        margin: 0 auto;
    }
    .login-wrap h2 {
        font-size: 1.6em;
    }
    .login-wrap .form input[type="text"],
    .login-wrap .form input[type="password"],
    .login-wrap .form button {
        width: 90%;
        margin-left: 5%;
        height: 48px;
        font-size: 16px; /* Evita zoom en iOS */
    }
    .login-wrap .form button {
        font-size: 1rem;
        min-height: 48px;
    }
    .alert {
        margin: 0 5% 15px 5%;
        font-size: 0.85rem;
    }
}

@media (max-width: 320px) {
    .login-wrap {
        padding: 10px 8px;
    }
    
    .login-wrap h2 {
        font-size: 1.4em;
    }
    
    .login-wrap .form input[type="text"],
    .login-wrap .form input[type="password"],
    .login-wrap .form button {
        width: 94%;
        margin-left: 3%;
    }
}