body {
            min-height: 100vh;
            overflow-x: hidden;
        }

        .login-shell {
            min-height: 100vh;
            display: grid;
            grid-template-columns:
                minmax(0, 1.15fr)
                minmax(420px, 0.85fr);

            background: var(--an-bg);
        }

        .login-brand {
            position: relative;

            display: flex;
            flex-direction: column;
            justify-content: space-between;

            min-height: 100vh;
            padding: 48px 56px;

            overflow: hidden;
            color: #fff;

            background:
                radial-gradient(
                    circle at 18% 22%,
                    rgba(99, 91, 255, .42),
                    transparent 32%
                ),
                radial-gradient(
                    circle at 78% 74%,
                    rgba(37, 99, 235, .24),
                    transparent 30%
                ),
                linear-gradient(
                    145deg,
                    #080B12 0%,
                    #101526 54%,
                    #161B35 100%
                );
        }

        .login-brand::before {
            content: "";

            position: absolute;
            inset: 0;

            pointer-events: none;

            background-image:
                linear-gradient(
                    rgba(255,255,255,.025) 1px,
                    transparent 1px
                ),
                linear-gradient(
                    90deg,
                    rgba(255,255,255,.025) 1px,
                    transparent 1px
                );

            background-size: 40px 40px;
        }

        .brand-top,
        .brand-main,
        .brand-footer {
            position: relative;
            z-index: 1;
        }

        .brand-top {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .brand-logo {
            display: grid;
            place-items: center;

            width: 42px;
            height: 42px;

            overflow: hidden;

            border: 1px solid rgba(255,255,255,.14);
            border-radius: 13px;

            background: rgba(255,255,255,.07);

            box-shadow:
                0 8px 24px rgba(0,0,0,.18);
        }

        .brand-logo img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .brand-name {
            font-size: 18px;
            font-weight: 700;
            letter-spacing: -.025em;
        }

        .brand-main {
            max-width: 650px;
            padding: 60px 0;
        }

        .brand-eyebrow {
            display: inline-flex;
            align-items: center;
            gap: 8px;

            margin-bottom: 22px;
            padding: 7px 11px;

            border: 1px solid rgba(255,255,255,.11);
            border-radius: 999px;

            background: rgba(255,255,255,.055);

            color: rgba(255,255,255,.78);

            font-size: 12px;
            font-weight: 600;
        }

        .brand-main h1 {
            max-width: 620px;
            margin-bottom: 18px;

            color: #fff;

            font-size: clamp(38px, 5vw, 62px);
            line-height: 1.02;
            letter-spacing: -.055em;
        }

        .brand-main p {
            max-width: 560px;
            margin-bottom: 30px;

            color: rgba(255,255,255,.58);

            font-size: 16px;
            line-height: 1.7;
        }

        .brand-features {
            display: grid;
            gap: 12px;
        }

        .brand-feature {
            display: flex;
            align-items: center;
            gap: 11px;

            color: rgba(255,255,255,.76);

            font-size: 13px;
        }

        .brand-feature-icon {
            display: grid;
            place-items: center;

            width: 28px;
            height: 28px;

            border-radius: 9px;

            background: rgba(99,91,255,.2);
            color: #BDB9FF;
        }

        .brand-footer {
            color: rgba(255,255,255,.32);
            font-size: 11px;
        }


        .login-panel {
            display: flex;
            align-items: center;
            justify-content: center;

            min-height: 100vh;

            padding: 44px;
        }

        .login-box {
            width: min(420px, 100%);
        }

        .login-mobile-brand {
            display: none;
        }

        .login-header {
            margin-bottom: 28px;
        }

        .login-header h2 {
            margin-bottom: 8px;

            color: var(--an-text);

            font-size: 28px;
            letter-spacing: -.035em;
        }

        .login-header p {
            margin: 0;

            color: var(--an-text-secondary);

            font-size: 14px;
        }

        .login-card {
            padding: 26px;

            border: 1px solid var(--an-border);
            border-radius: var(--an-radius-xl);

            background: var(--an-surface);

            box-shadow: var(--an-shadow-md);
        }

        .login-form-stack {
            display: flex;
            flex-direction: column;
            gap: 18px;
        }

        .login-input-wrapper {
            position: relative;
        }

        .login-input-icon {
            position: absolute;
            top: 50%;
            left: 14px;

            transform: translateY(-50%);

            color: var(--an-text-muted);

            pointer-events: none;
        }

        .login-input {
            padding-left: 42px;
        }

        .password-toggle {
            position: absolute;
            top: 50%;
            right: 8px;

            transform: translateY(-50%);

            display: grid;
            place-items: center;

            width: 34px;
            height: 34px;

            border-radius: 8px;

            background: transparent;
            color: var(--an-text-muted);

            cursor: pointer;
        }

        .password-toggle:hover {
            background: var(--an-surface-tertiary);
            color: var(--an-text-secondary);
        }

        .password-input {
            padding-right: 48px;
        }

        #errorMsg {
            display: none;
            margin-bottom: 18px;
        }

        #errorMsg.show {
            display: flex;
        }

        #twoFactorStep {
            display: none;
        }

        .twofa-intro {
            display: flex;
            gap: 12px;

            margin-bottom: 22px;
            padding: 14px;

            border: 1px solid rgba(99,91,255,.18);
            border-radius: var(--an-radius-md);

            background: var(--an-primary-soft);
        }

        .twofa-icon {
            display: grid;
            place-items: center;

            flex: 0 0 auto;

            width: 36px;
            height: 36px;

            border-radius: 10px;

            background: var(--an-primary);
            color: #fff;
        }

        .twofa-copy strong {
            display: block;
            margin-bottom: 3px;

            color: var(--an-text);

            font-size: 13px;
        }

        .twofa-copy span {
            color: var(--an-text-secondary);

            font-size: 12px;
            line-height: 1.5;
        }

        .code-input {
            padding-left: 14px;

            text-align: center;

            font-family: var(--an-font-mono);

            font-size: 26px;
            font-weight: 700;

            letter-spacing: 10px;
        }

        .login-actions {
            display: flex;
            flex-direction: column;
            gap: 10px;

            margin-top: 4px;
        }

        .login-security {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 7px;

            margin-top: 20px;

            color: var(--an-text-muted);

            font-size: 11px;
        }

        .back-link {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 7px;

            width: 100%;
            min-height: 36px;

            border-radius: var(--an-radius-md);

            color: var(--an-text-secondary);

            font-size: 12px;
            font-weight: 600;

            cursor: pointer;
        }

        .back-link:hover {
            background: var(--an-surface-tertiary);
            color: var(--an-text);
        }

        .login-theme {
            position: fixed;
            top: 18px;
            right: 18px;

            z-index: 20;
        }

        .login-theme.an-btn {
            width: 38px;
            height: 38px;

            padding: 0;

            border-radius: 11px;

            box-shadow: var(--an-shadow-sm);
        }

        .loader {
            display: inline-block;

            width: 17px;
            height: 17px;

            border: 2px solid rgba(255,255,255,.35);
            border-top-color: #fff;
            border-radius: 50%;

            animation: login-spin .7s linear infinite;
        }

        @keyframes login-spin {
            to {
                transform: rotate(360deg);
            }
        }


        @media (max-width: 960px) {
            .login-shell {
                display: block;
            }

            .login-brand {
                display: none;
            }

            .login-panel {
                min-height: 100vh;

                align-items: flex-start;

                padding:
                    96px 22px 36px;
            }

            .login-box {
                width: min(460px, 100%);
                margin: 0 auto;
            }

            .login-mobile-brand {
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                gap: 8px;

                margin-bottom: 34px;
            }

            .login-mobile-brand img {
                width: 96px;
                height: 72px;

                border-radius: 0;

                object-fit: contain;

                transform: scale(1.35);
                transform-origin: center;
            }

            .login-mobile-brand strong {
                margin-top: 2px;

                font-size: 22px;
                font-weight: 700;

                letter-spacing: -.03em;
            }

            .login-header {
                margin-bottom: 24px;
            }

            .login-header h2 {
                font-size: 28px;
            }
        }


        @media (max-width: 480px) {
            .login-panel {
                padding:
                    82px 14px 28px;
            }

            .login-mobile-brand {
                margin-bottom: 28px;
            }

            .login-mobile-brand img {
                width: 88px;
                height: 66px;

                transform: scale(1.35);
            }

            .login-mobile-brand strong {
                font-size: 21px;
            }

            .login-header h2 {
                font-size: 25px;
            }

            .login-header p {
                font-size: 13px;
                line-height: 1.55;
            }

            .login-card {
                padding: 20px;
            }

            .code-input {
                font-size: 23px;
                letter-spacing: 7px;
            }
        }

.hidden { display: none !important; }

/* LOGIN_V6_2_LOCAL_ICONS_START */

/* A tela de login não depende mais de Font Awesome/CDN. */
body.an-login-global i.fas {
    display: inline-block;
    width: 1em;
    height: 1em;
    flex: 0 0 auto;
    font-family: inherit !important;
    font-style: normal;
    line-height: 1;
}

body.an-login-global i.fas::before {
    content: "" !important;
    display: block;
    width: 100%;
    height: 100%;
    background: currentColor;
    -webkit-mask-image: var(--an-local-icon);
    mask-image: var(--an-local-icon);
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
}

body.an-login-global .fa-moon {
    --an-local-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22black%22%20d%3D%22M20.2%2015.3A8.5%208.5%200%200%201%208.7%203.8%208.5%208.5%200%201%200%2020.2%2015.3Z%22%2F%3E%3C%2Fsvg%3E");
}

body.an-login-global .fa-sun {
    --an-local-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2212%22%20r%3D%224%22%20fill%3D%22black%22%2F%3E%3Cpath%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20d%3D%22M12%202v2M12%2020v2M4.93%204.93l1.42%201.42M17.65%2017.65l1.42%201.42M2%2012h2M20%2012h2M4.93%2019.07l1.42-1.42M17.65%206.35l1.42-1.42%22%2F%3E%3C%2Fsvg%3E");
}

body.an-login-global .fa-shield-halved {
    --an-local-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22black%22%20d%3D%22M12%202%204%205v6c0%205.2%203.4%209.2%208%2011%204.6-1.8%208-5.8%208-11V5l-8-3Zm0%203%205%201.9V11c0%203.6-2.1%206.5-5%208-2.9-1.5-5-4.4-5-8V6.9L12%205Z%22%2F%3E%3C%2Fsvg%3E");
}

body.an-login-global .fa-wifi {
    --an-local-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Ccircle%20cx%3D%2212%22%20cy%3D%2218%22%20r%3D%222%22%20fill%3D%22black%22%2F%3E%3Cpath%20fill%3D%22black%22%20d%3D%22m8.8%2014.8%201.4%201.4a2.55%202.55%200%200%201%203.6%200l1.4-1.4a4.55%204.55%200%200%200-6.4%200Zm-3-3%201.4%201.4a6.8%206.8%200%200%201%209.6%200l1.4-1.4a8.8%208.8%200%200%200-12.4%200Zm-3-3%201.4%201.4a11%2011%200%200%201%2015.6%200l1.4-1.4a13%2013%200%200%200-18.4%200Z%22%2F%3E%3C%2Fsvg%3E");
}

body.an-login-global .fa-chart-line {
    --an-local-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22black%22%20d%3D%22M4%2019h16v2H2V3h2v16Zm3-3%203.5-4%203%202%204.8-6%201.6%201.2-6%207.5-3.1-2.1-2.3%202.7L7%2016Z%22%2F%3E%3C%2Fsvg%3E");
}

body.an-login-global .fa-lock {
    --an-local-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22black%22%20d%3D%22M6%2010V8a6%206%200%200%201%2012%200v2h1a2%202%200%200%201%202%202v8a2%202%200%200%201-2%202H5a2%202%200%200%201-2-2v-8a2%202%200%200%201%202-2h1Zm3%200h6V8a3%203%200%200%200-6%200v2Zm3%204a2%202%200%200%200-1%203.7V19h2v-1.3A2%202%200%200%200%2012%2014Z%22%2F%3E%3C%2Fsvg%3E");
}

body.an-login-global .fa-key {
    --an-local-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22black%22%20d%3D%22M14.5%203a6.5%206.5%200%201%200%204.3%2011.4L22%2017.6V21h-3.4l-1.3-1.3-1.5%201.5-2-2%201.5-1.5-1.2-1.2a6.5%206.5%200%200%200%20.4-13.5Zm0%203a3.5%203.5%200%201%201%200%207%203.5%203.5%200%200%201%200-7Z%22%2F%3E%3C%2Fsvg%3E");
}

body.an-login-global .fa-eye {
    --an-local-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22black%22%20d%3D%22M12%205C6.5%205%202.3%209.2%201%2012c1.3%202.8%205.5%207%2011%207s9.7-4.2%2011-7c-1.3-2.8-5.5-7-11-7Zm0%2011a4%204%200%201%201%200-8%204%204%200%200%201%200%208Zm0-2a2%202%200%201%200%200-4%202%202%200%200%200%200%204Z%22%2F%3E%3C%2Fsvg%3E");
}

body.an-login-global .fa-eye-slash {
    --an-local-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22black%22%20d%3D%22m3.3%202%2018.7%2018.7-1.4%201.4-3-3A12%2012%200%200%201%2012%2020C6.5%2020%202.3%2015.8%201%2013c.7-1.5%202.2-3.4%204.3-4.9L1.9%204.7%203.3%202Zm4.2%208.2A4%204%200%200%200%2013.8%2016l-1.7-1.7a2%202%200%200%201-2.4-2.4l-2.2-1.7ZM12%206c5.5%200%209.7%204.2%2011%207-.6%201.3-1.8%202.9-3.4%204.2l-2.1-2.1A4%204%200%200%200%2012%209.6L9.6%207.2A11.9%2011.9%200%200%201%2012%206Z%22%2F%3E%3C%2Fsvg%3E");
}

body.an-login-global .fa-circle-exclamation {
    --an-local-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22black%22%20d%3D%22M12%202a10%2010%200%201%200%200%2020%2010%2010%200%200%200%200-20Zm-1%205h2v7h-2V7Zm0%209h2v2h-2v-2Z%22%2F%3E%3C%2Fsvg%3E");
}

body.an-login-global .fa-arrow-right-to-bracket {
    --an-local-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22black%22%20d%3D%22M13%203h8v18h-8v-2h6V5h-6V3Zm-2.6%204.6%201.4%201.4-2%202H16v2H9.8l2%202-1.4%201.4L6%2012l4.4-4.4ZM3%204h8v2H5v12h6v2H3V4Z%22%2F%3E%3C%2Fsvg%3E");
}


/* LOGIN_GLOBAL_EXTRA_ICONS_START */

body.an-login-global .fa-envelope {
    --an-local-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22black%22%20d%3D%22M3%205h18a2%202%200%200%201%202%202v10a2%202%200%200%201-2%202H3a2%202%200%200%201-2-2V7a2%202%200%200%201%202-2Zm9%207%207.5-5h-15L12%2012Zm0%202.4L3%208.4V17h18V8.4l-9%206Z%22%2F%3E%3C%2Fsvg%3E");
}

body.an-login-global .fa-arrow-left {
    --an-local-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%3Cpath%20fill%3D%22black%22%20d%3D%22m10.8%205.4-1.4-1.4L1.4%2012l8%208%201.4-1.4L5.2%2013H22v-2H5.2l5.6-5.6Z%22%2F%3E%3C%2Fsvg%3E");
}

/* LOGIN_GLOBAL_EXTRA_ICONS_END */

/* Desktop: o login ocupa exatamente o viewport, sem rolagem residual. */
@media (min-width: 961px) {
    html {
        height: 100%;
    }

    body.an-login-global {
        height: 100%;
        min-height: 100%;
        overflow: hidden;
    }

    body.an-login-global #loginView,
    body.an-login-global .login-shell {
        height: 100dvh;
        min-height: 100dvh;
    }

    body.an-login-global .login-brand,
    body.an-login-global .login-panel {
        height: 100dvh;
        min-height: 0;
    }
}

/* Mobile continua podendo rolar quando a altura disponível exigir. */
@media (max-width: 960px) {
    body.an-login-global {
        overflow-x: hidden;
        overflow-y: auto;
    }
}

/* LOGIN_V6_2_LOCAL_ICONS_END */


/* ==========================================================
   LOGIN_MINIMAL_MOBILE_V1_START
   Somente:
   - logo sem nome escrito
   - textos mobile centralizados
   ========================================================== */

@media (max-width: 960px) {

    .login-mobile-brand {
        justify-content:
            center !important;

        text-align:
            center !important;
    }


    .login-mobile-brand img {
        display:
            block;

        margin-left:
            auto !important;

        margin-right:
            auto !important;
    }


    .login-header {
        width:
            100%;

        text-align:
            center !important;
    }


    .login-header h2,
    .login-header p {
        width:
            100%;

        margin-left:
            auto !important;

        margin-right:
            auto !important;

        text-align:
            center !important;
    }


    .login-security {
        justify-content:
            center !important;

        text-align:
            center !important;
    }


    .twofa-intro {
        align-items:
            center;

        text-align:
            center;
    }


    .twofa-copy,
    .twofa-copy strong,
    .twofa-copy span {
        text-align:
            center !important;
    }


    /*
     * Formulário permanece convencional.
     */

    .an-field,
    .an-label,
    .an-field-help {
        text-align:
            left !important;
    }
}

/* LOGIN_MINIMAL_MOBILE_V1_END */


/* ==========================================================
   LOGIN_MOBILE_HEADER_CENTER_V1
   Centraliza somente:
   "Acesse sua conta"
   e o subtítulo abaixo
   ========================================================== */

@media (max-width: 960px) {

    body.an-login-global
    .login-panel
    .login-box
    .login-header {
        display:
            flex !important;

        flex-direction:
            column !important;

        align-items:
            center !important;

        justify-content:
            center !important;

        width:
            100% !important;

        text-align:
            center !important;
    }


    body.an-login-global
    .login-panel
    .login-box
    .login-header h2 {
        display:
            block !important;

        width:
            100% !important;

        margin-left:
            auto !important;

        margin-right:
            auto !important;

        text-align:
            center !important;
    }


    body.an-login-global
    .login-panel
    .login-box
    .login-header p {
        display:
            block !important;

        width:
            100% !important;

        margin-left:
            auto !important;

        margin-right:
            auto !important;

        text-align:
            center !important;
    }
}

/* LOGIN_MOBILE_HEADER_CENTER_V1_END */


/* ==========================================================
   LOGIN_ORBITRON_OFFICIAL_V1
   Tipografia oficial AstraNexo
   ========================================================== */

body.an-login-global,
body.an-login-global button,
body.an-login-global input,
body.an-login-global select,
body.an-login-global textarea {
    font-family:
        'Orbitron',
        sans-serif !important;
}

/* LOGIN_ORBITRON_OFFICIAL_V1_END */
