:root {
    --primary: #0879bd;
    --primary-dark: #045b91;
    --text: #22303f;
    --muted: #718096;
    --border: #d7e1e8;
    --background: #f8fbfd;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--text);
}

.login-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 40px 8%;
    background: url("img_fondo.jpg") center center / cover no-repeat;
}

.login-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(0, 20, 40, 0.05) 0%,
        rgba(0, 20, 40, 0.15) 45%,
        rgba(0, 20, 40, 0.68) 100%
    );
}

.login-box {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 430px;
    padding: 38px 38px 30px;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 18px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.28);
}

.brand {
    text-align: center;
    margin-bottom: 26px;
}

.brand-icon {
    width: 66px;
    height: 66px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #0879bd, #13a7be);
    color: white;
    font-size: 42px;
    font-weight: 300;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(8, 121, 189, 0.25);
}

.brand h1 {
    font-size: 19px;
    line-height: 1.3;
    color: #0d4d77;
}

.brand p {
    margin-top: 5px;
    font-size: 13px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.login-title {
    text-align: center;
    margin-bottom: 25px;
}

.login-title h2 {
    font-size: 23px;
    font-weight: 650;
    margin-bottom: 5px;
}

.login-title p {
    font-size: 13px;
    color: var(--muted);
}

.login-form {
    width: 100%;
}

.form-group {
    width: 100%;
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #415466;
}

.input-box {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.input-box input {
    width: 100%;
    height: 52px;
    padding: 0 48px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--background);
    color: var(--text);
    font-size: 15px;
    outline: none;
    transition: 0.2s;
}

.input-box input::placeholder {
    color: #a0adb8;
}

.input-box input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(8, 121, 189, 0.12);
}

.input-icon {
    position: absolute;
    left: 16px;
    width: 19px;
    height: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.input-icon svg {
    width: 19px;
    height: 19px;
    fill: #7990a2;
}

.input-box:focus-within .input-icon svg {
    fill: var(--primary);
}

.show-password {
    position: absolute;
    right: 12px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.show-password:hover {
    background: #e9f4fa;
}

.show-password svg {
    width: 19px;
    height: 19px;
    fill: #7990a2;
}

.btn-login {
    width: 100%;
    height: 52px;
    margin-top: 5px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary-dark), #0a98ae);
    color: white;
    font-size: 15px;
    font-weight: 650;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 7px 18px rgba(5, 91, 145, 0.22);
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(5, 91, 145, 0.30);
}

.alert {
    margin-bottom: 18px;
    padding: 11px 13px;
    border: 1px solid #ffc7c7;
    border-radius: 9px;
    background: #fff2f2;
    color: #b52b2b;
    font-size: 13px;
    text-align: center;
}

.login-footer {
    margin-top: 25px;
    padding-top: 18px;
    border-top: 1px solid #e7edf1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #7a8996;
    font-size: 11.5px;
}

.security-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #21a56f;
    box-shadow: 0 0 0 3px rgba(33, 165, 111, 0.12);
}

@media (max-width: 900px) {
    .login-page {
        justify-content: center;
        padding: 25px;
    }

    .login-overlay {
        background: rgba(0, 29, 55, 0.55);
    }
}

@media (max-width: 500px) {
    .login-page {
        padding: 15px;
        background-position: 35% center;
    }

    .login-box {
        max-width: 390px;
        padding: 30px 22px 25px;
        border-radius: 15px;
    }

    .brand-icon {
        width: 58px;
        height: 58px;
        font-size: 36px;
    }

    .brand h1 {
        font-size: 17px;
    }

    .login-title h2 {
        font-size: 21px;
    }

    .input-box input {
        height: 50px;
        font-size: 14px;
    }
}