:root {
    --background: #020b17;
    --background-secondary: #061424;
    --card-background: #ffffff;
    --yellow: #ffb000;
    --yellow-light: #ffc740;
    --yellow-dark: #e89900;
    --text-dark: #07111e;
    --text-muted: #6f7b8c;
    --border: #e2e7ed;
    --danger: #d94b4b;
    --success: #249e67;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Montserrat", sans-serif;
}

html,
body {
    min-height: 100%;
}

body {
    color: var(--text-dark);
    background: var(--background);
}

button,
input {
    font: inherit;
}

a {
    text-decoration: none;
}

.login-page {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 45px;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 12% 15%,
            rgba(255, 176, 0, 0.12),
            transparent 24%
        ),
        radial-gradient(
            circle at 90% 90%,
            rgba(24, 91, 151, 0.16),
            transparent 28%
        ),
        linear-gradient(
            135deg,
            #020914 0%,
            #061424 55%,
            #020b17 100%
        );
}

.login-page::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.2;
    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        );
    background-size: 48px 48px;
    mask-image:
        linear-gradient(
            to bottom,
            black,
            transparent 85%
        );
}

.login-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(100px);
}

.login-glow-one {
    top: -100px;
    right: -70px;
    width: 350px;
    height: 350px;
    opacity: 0.18;
    background: var(--yellow);
}

.login-glow-two {
    bottom: -150px;
    left: -100px;
    width: 380px;
    height: 380px;
    opacity: 0.16;
    background: #1464a2;
}

.back-home {
    position: absolute;
    top: 26px;
    left: 34px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #a7b3c3;
    font-size: 13px;
    font-weight: 600;
    transition: 0.25s ease;
}

.back-home i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 11px;
}

.back-home:hover {
    color: #ffffff;
    transform: translateX(-3px);
}

.login-container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    width: min(1180px, 100%);
    min-height: 720px;
    overflow: hidden;
    /*background: var(--card-background);
    border: 1px solid rgba(255, 255, 255, 0.08);*/
    border-radius: 32px;
    box-shadow: 0 45px 120px rgba(0, 0, 0, 0.48);
}

/* LADO INSTITUCIONAL */

.login-presentation {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 52px;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(
            circle at 85% 12%,
            rgba(255, 176, 0, 0.2),
            transparent 30%
        ),
        linear-gradient(
            145deg,
            #06182b 0%,
            #020b17 100%
        );
}

.login-presentation::after {
    content: "";
    position: absolute;
    right: -130px;
    bottom: 40px;
    width: 330px;
    height: 330px;
    border: 70px solid rgba(255, 176, 0, 0.035);
    border-radius: 50%;
}

.presentation-content,
.presentation-footer {
    position: relative;
    z-index: 2;
}

.presentation-logo {
    display: inline-flex;
    margin-bottom: 58px;
}

.presentation-logo img {
    width: auto;
    height: 84px;
    object-fit: contain;
}

.presentation-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: fit-content;
    margin-bottom: 24px;
    padding: 9px 13px;
    color: var(--yellow-light);
    background: rgba(255, 176, 0, 0.08);
    border: 1px solid rgba(255, 176, 0, 0.18);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.login-presentation h1 {
    max-width: 480px;
    margin-bottom: 20px;
    font-size: clamp(40px, 4vw, 58px);
    font-weight: 800;
    line-height: 1.03;
    letter-spacing: -2.7px;
}

.login-presentation h1 span {
    color: var(--yellow);
}

.login-presentation > .presentation-content > p {
    max-width: 500px;
    margin-bottom: 38px;
    color: #a5b2c3;
    font-size: 15px;
    line-height: 1.8;
}

.presentation-benefits {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.presentation-benefit {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.065);
    border-radius: 16px;
    backdrop-filter: blur(12px);
}

.benefit-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    color: var(--yellow);
    background: rgba(255, 176, 0, 0.1);
    border-radius: 13px;
}

.presentation-benefit strong {
    display: block;
    margin-bottom: 5px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.presentation-benefit span {
    display: block;
    color: #93a1b3;
    font-size: 11px;
    line-height: 1.6;
}

.presentation-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 45px;
    color: #6f8094;
    font-size: 10px;
}

/* ÁREA DO FORMULÁRIO */

.login-form-area {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 65px;
    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(255, 176, 0, 0.07),
            transparent 24%
        ),
        #ffffff;
}

.login-form-wrapper {
    width: 100%;
    max-width: 440px;
}

.mobile-logo {
    display: none;
    margin-bottom: 34px;
    text-align: center;
}

.mobile-logo img {
    height: 74px;
    width: auto;
}

.login-heading {
    margin-bottom: 31px;
}

.login-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    color: #07111e;
    background:
        linear-gradient(
            135deg,
            var(--yellow),
            var(--yellow-light)
        );
    border-radius: 15px;
    box-shadow: 0 12px 28px rgba(255, 176, 0, 0.22);
}

.login-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: var(--yellow-dark);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.login-heading h2 {
    margin-bottom: 10px;
    color: var(--text-dark);
    font-size: 31px;
    font-weight: 800;
    letter-spacing: -1.2px;
}

.login-heading p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.7;
}

.alert-custom {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 21px;
    padding: 13px 15px;
    border-radius: 13px;
    font-size: 12px;
    line-height: 1.5;
}

.alert-custom i {
    margin-top: 2px;
}

.alert-custom strong,
.alert-custom span {
    display: block;
}

.alert-success-custom {
    color: #197b50;
    background: #eefaf5;
    border: 1px solid #cfeee0;
}

.alert-error-custom {
    color: #a33636;
    background: #fff3f3;
    border: 1px solid #f2d1d1;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 21px;
}

.form-group-custom {
    width: 100%;
}

.form-group-custom label {
    display: block;
    margin-bottom: 9px;
    color: #202c3a;
    font-size: 12px;
    font-weight: 700;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.forgot-password {
    margin-bottom: 9px;
    color: #b87800;
    font-size: 11px;
    font-weight: 700;
    transition: 0.2s ease;
}

.forgot-password:hover {
    color: #865900;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 58px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 15px;
    transition: 0.22s ease;
}

.input-wrapper:focus-within {
    background: #ffffff;
    border-color: var(--yellow);
    box-shadow: 0 0 0 4px rgba(255, 176, 0, 0.1);
}

.input-wrapper.input-error {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(217, 75, 75, 0.07);
}

.input-icon {
    position: absolute;
    left: 18px;
    color: #98a4b4;
    font-size: 15px;
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    height: 100%;
    padding: 0 52px 0 48px;
    color: var(--text-dark);
    background: transparent;
    border: none;
    outline: none;
    font-size: 13px;
    font-weight: 500;
}

.input-wrapper input::placeholder {
    color: #a7b0bd;
    font-weight: 400;
}

.toggle-password {
    position: absolute;
    right: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #8e9aa9;
    background: transparent;
    border: none;
    border-radius: 11px;
    cursor: pointer;
    transition: 0.2s ease;
}

.toggle-password:hover {
    color: var(--text-dark);
    background: #edf1f5;
}

.field-error {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 7px;
    color: var(--danger);
    font-size: 10px;
    font-weight: 600;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.remember-option {
    display: inline-flex !important;
    align-items: center;
    gap: 9px;
    margin: 0 !important;
    color: #657183 !important;
    cursor: pointer;
    font-size: 11px !important;
    font-weight: 600 !important;
    user-select: none;
}

.remember-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    color: #07111e;
    background: #ffffff;
    border: 1px solid #cfd6df;
    border-radius: 6px;
    transition: 0.2s ease;
}

.custom-checkbox i {
    opacity: 0;
    font-size: 9px;
    transform: scale(0.5);
    transition: 0.2s ease;
}

.remember-option input:checked + .custom-checkbox {
    background:
        linear-gradient(
            135deg,
            var(--yellow),
            var(--yellow-light)
        );
    border-color: var(--yellow);
}

.remember-option input:checked + .custom-checkbox i {
    opacity: 1;
    transform: scale(1);
}

.login-button {
    position: relative;
    width: 100%;
    height: 58px;
    overflow: hidden;
    color: #07111e;
    background:
        linear-gradient(
            135deg,
            var(--yellow),
            var(--yellow-light)
        );
    border: none;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(255, 176, 0, 0.2);
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    transition: 0.25s ease;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 38px rgba(255, 176, 0, 0.3);
}

.login-button:active {
    transform: translateY(0);
}

.button-content,
.button-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
}

.button-loading {
    display: none;
}

.login-button.loading .button-content {
    display: none;
}

.login-button.loading .button-loading {
    display: flex;
}

.login-button:disabled {
    cursor: wait;
    opacity: 0.85;
}

.register-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 27px;
    padding-top: 24px;
    color: #7b8695;
    border-top: 1px solid #edf0f3;
    font-size: 11px;
}

.register-area a {
    color: #ad7100;
    font-weight: 800;
}

.register-area a:hover {
    color: #744d00;
}

.security-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 24px;
    color: #9aa4b2;
    font-size: 9px;
}

.security-message i {
    color: #6f7e8f;
}

/* RESPONSIVIDADE */

@media (max-width: 1050px) {
    .login-page {
        padding: 30px;
    }

    .login-presentation {
        padding: 40px;
    }

    .login-form-area {
        padding: 48px;
    }

    .login-presentation h1 {
        font-size: 44px;
    }
}

@media (max-width: 850px) {
    .login-page {
        align-items: flex-start;
        padding: 30px 20px;
    }

    .back-home {
        position: relative;
        top: auto;
        left: auto;
        align-self: flex-start;
        margin-bottom: 20px;
    }

    .login-page {
        flex-direction: column;
    }

    .login-container {
        display: block;
        min-height: auto;
        border-radius: 26px;
    }

    .login-presentation {
        display: none;
    }

    .login-form-area {
        padding: 55px 40px;
    }

    .mobile-logo {
        display: block;
    }

    .login-heading {
        text-align: center;
    }

    .login-icon {
        margin-right: auto;
        margin-left: auto;
    }
}

@media (max-width: 520px) {
    .login-page {
        padding: 20px 13px;
    }

    .back-home {
        margin-left: 5px;
    }

    .back-home span {
        display: none;
    }

    .login-container {
        border-radius: 21px;
    }

    .login-form-area {
        padding: 38px 22px;
    }

    .mobile-logo img {
        height: 65px;
    }

    .login-heading h2 {
        font-size: 26px;
    }

    .login-options {
        align-items: flex-start;
        flex-direction: column;
    }

    .label-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0;
    }

    .forgot-password {
        order: 2;
    }

    .input-wrapper {
        height: 55px;
    }
}