﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(145deg, #0a2540, #1f4662);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    overflow: visible;
}

.login-container {
    width: 100%;
    max-width: 450px;
    background: #f5f9fc;
    border-radius: 30px;
    padding: 80px 35px 35px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: visible;
}

/* scroll interno */
.login-scroll {
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: none;
    padding-right: 5px;
}

    .login-scroll::-webkit-scrollbar {
        display: none;
    }

/* ===== AVATAR SUTIL ===== */
.avatar-container {
    position: absolute;
    top: -75px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(145deg, #0a2540, #1f4662);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    border: 3px solid rgba(245, 249, 252, 0.7);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

/* ===== HEADER ===== */
.login-header {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 30px;
}

    .login-header h2 {
        color: #0a2540;
        font-size: 2rem;
        font-weight: 700;
        margin-bottom: 8px;
    }

    .login-header p {
        color: #1f4662;
        font-size: 0.95rem;
        opacity: 0.8;
    }

/* ===== FORM ===== */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #0a2540;
    font-weight: 500;
    font-size: 0.95rem;
}

.input-wrapper {
    position: relative;
}

    .input-wrapper i:not(.password-toggle) {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        color: #1f4662;
        font-size: 1.1rem;
        opacity: 0.6;
        transition: opacity 0.3s;
    }

input {
    width: 100%;
    padding: 15px 45px 15px 45px;
    border-radius: 12px;
    border: 2px solid #e0e8f0;
    outline: none;
    font-size: 1rem;
    background: white;
    color: #0a2540;
    transition: all 0.3s;
}

    input::placeholder {
        color: #94a3b8;
        font-size: 0.95rem;
    }

    input:focus {
        border-color: #0a2540;
        box-shadow: 0 4px 12px rgba(10, 37, 64, 0.1);
    }

        input:focus + i:not(.password-toggle) {
            opacity: 1;
            color: #0a2540;
        }

/* ===== PASSWORD TOGGLE A LA DERECHA ===== */
.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #1f4662;
    font-size: 1.1rem;
    opacity: 0.6;
    z-index: 2;
    transition: opacity 0.3s;
}

    .password-toggle:hover {
        opacity: 1;
        color: #0a2540;
    }

/* ===== CHECKBOX Y LINKS ===== */
.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0 25px;
}

.remember {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .remember input[type="checkbox"] {
        width: 18px;
        height: 18px;
        cursor: pointer;
        accent-color: #0a2540;
    }

    .remember label {
        margin-bottom: 0;
        cursor: pointer;
        color: #1f4662;
    }

.forgot-link {
    color: #0a2540;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
}

    .forgot-link:hover {
        text-decoration: underline;
    }

/* ===== BOTÓN ===== */
.login-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(145deg, #0a2540, #1f4662);
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(10, 37, 64, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

    .login-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(10, 37, 64, 0.3);
        background: linear-gradient(145deg, #1f4662, #0a2540);
    }

    .login-btn i {
        font-size: 1.2rem;
    }

/* ===== REGISTER LINK ===== */
.register-link {
    text-align: center;
    margin-top: 25px;
    color: #1f4662;
    font-size: 0.95rem;
}

    .register-link a {
        color: #0a2540;
        text-decoration: none;
        font-weight: 600;
        margin-left: 5px;
        cursor: pointer;
    }

        .register-link a:hover {
            text-decoration: underline;
        }



/* ===== RESPONSIVE ===== */
@media (max-height: 700px) {
    .avatar {
        width: 130px;
        height: 130px;
        font-size: 3.8rem;
    }

    .avatar-container {
        top: -70px;
    }

    .login-container {
        padding-top: 75px;
    }

    .login-scroll {
        max-height: 68vh;
    }
}

@media (max-height: 600px) {
    .avatar {
        width: 120px;
        height: 120px;
        font-size: 3.5rem;
    }

    .avatar-container {
        top: -65px;
    }

    .login-container {
        padding-top: 70px;
    }

    .login-header h2 {
        font-size: 1.8rem;
    }
}

@media (max-height: 500px) {
    .avatar {
        width: 110px;
        height: 110px;
        font-size: 3.2rem;
    }

    .avatar-container {
        top: -60px;
    }

    .login-container {
        padding-top: 65px;
    }

    .login-header h2 {
        font-size: 1.6rem;
    }

    .login-header p {
        display: none;
    }
}

@media (max-width: 380px) {
    .login-container {
        padding: 75px 25px 25px;
    }

    .avatar {
        width: 120px;
        height: 120px;
        font-size: 3.5rem;
    }

    .avatar-container {
        top: -65px;
    }

    .login-header h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 320px) {
    .login-container {
        padding: 70px 20px 20px;
    }

    .avatar {
        width: 110px;
        height: 110px;
        font-size: 3.2rem;
    }

    .avatar-container {
        top: -60px;
    }

    input {
        padding: 12px 40px 12px 40px;
    }
}

/* Ajuste para autocompletado */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px white inset;
    border: 2px solid #0a2540;
}
