.login-page {
    min-height: 100vh;
    margin: 0;
    background:
        linear-gradient(90deg, rgba(8, 56, 104, .42) 0%, rgba(6, 51, 109, .28) 26%, rgba(8, 39, 117, .50) 68%, rgba(10, 29, 122, .76) 100%),
        url('../../img/fundo_gexames.jpg') center center / cover no-repeat;
    font-family: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #fff;
    overflow: hidden;
}

.login-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 30%, rgba(255,255,255,.12), transparent 18%),
        radial-gradient(circle at 72% 12%, rgba(115,225,255,.14), transparent 10%),
        linear-gradient(180deg, rgba(255,255,255,.04), transparent 18%);
}

.login-layout {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 440px;
}

.login-showcase {
    display: flex;
    align-items: center;
    padding: 2rem clamp(2rem, 5vw, 4.8rem);
}

.showcase-content {
    max-width: 560px;
    opacity: 0;
    transform: translateY(22px);
    animation: elegantReveal 1.35s cubic-bezier(.22, 1, .36, 1) .20s forwards;
}

.showcase-kicker {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: 1rem;
    color: rgba(208, 241, 255, .95);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.showcase-kicker::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6ce6ff, #19a4ff);
    box-shadow: 0 0 0 6px rgba(108, 230, 255, .16);
    animation: premiumPulse 1s ease-in-out infinite;
}

.showcase-logo-mobile {
    display: none;
}

.showcase-copy h1,
.showcase-copy h2 {
    margin: 0;
    font-family: "Manrope", "Inter", sans-serif;
    font-size: clamp(2rem, 3.4vw, 3.45rem);
    line-height: 1.04;
    font-weight: 500;
    letter-spacing: -.04em;
    color: rgba(255, 255, 255, .98);
    text-wrap: balance;
}

.showcase-copy h2 {
    margin-top: 1.6rem;
}

.showcase-copy strong {
    font-weight: 800;
    color: #fff;
}

.showcase-copy p {
    max-width: 470px;
    margin: 1.3rem 0 0;
    color: rgba(225, 240, 255, .90);
    font-size: .98rem;
    line-height: 1.72;
}

.login-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 2.6rem 2rem 1rem;
}

.login-card {
    position: relative;
    width: 100%;
    max-width: 320px;
    padding: 1.5rem 1.42rem 1.12rem;
    border-radius: 28px;
    background: linear-gradient(160deg,
        rgba(255, 255, 255, 0.96) 0%,
        rgba(247, 251, 255, 0.93) 48%,
        rgba(233, 243, 255, 0.88) 100%);
    border: 1px solid rgba(255, 255, 255, 0.58);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow:
        0 34px 80px rgba(0, 0, 0, .34),
        0 14px 34px rgba(0, 0, 0, .20),
        inset 0 1px 0 rgba(255,255,255,.50);
    color: #1b2b42;
    opacity: 0;
    transform: translateY(24px) scale(.985);
    animation: elegantRevealCard 1.65s cubic-bezier(.22, 1, .36, 1) .45s forwards;
    transition: transform .3s ease, box-shadow .3s ease, background .3s ease;
}

.login-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 40px 88px rgba(0, 0, 0, .38),
        0 18px 38px rgba(0, 0, 0, .22),
        inset 0 1px 0 rgba(255,255,255,.54);
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 28px;
    padding: 1px;
    background: linear-gradient(180deg, rgba(255,255,255,.58), rgba(185,225,255,.18));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

.login-card__logo-wrap {
    position: relative;
    display: block;
    width: 124px;
    max-width: 100%;
    margin: 0 auto .85rem;
    overflow: hidden;
    border-radius: 14px;
}

.login-card__logo {
    display: block;
    width: 124px;
    max-width: 100%;
    margin: 0;
    filter: drop-shadow(0 8px 14px rgba(30, 100, 201, .08));
    animation: logoBlinkSoft 10s ease-in-out infinite;
}

.login-card__header {
    text-align: center;
    margin-bottom: 1.05rem;
}

.login-card__header h3 {
    margin: 0 0 .3rem;
    font-family: "Manrope", "Inter", sans-serif;
    font-size: 1.16rem;
    line-height: 1.15;
    letter-spacing: -.03em;
    color: #16273d;
    white-space: nowrap;
}

.login-card__header p {
    margin: 0;
    color: #74889c;
    font-size: .81rem;
    line-height: 1.3;
    white-space: nowrap;
}

.login-form {
    gap: .82rem;
}

.field--minimal > span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.field--minimal input,
.field--minimal .password-field {
    min-height: 48px;
}

.field--minimal input {
    border: 1px solid #d9e5ef;
    border-radius: 16px;
    background: rgba(255, 255, 255, .98);
    color: #29425d;
    padding: .85rem .95rem;
    font-size: .93rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.4);
    transition: all .3s ease;
}

.field--minimal input::placeholder {
    color: #8296aa;
}

.field--minimal input:hover {
    border-color: #b9d8ec;
}

.field--minimal input:focus {
    border-color: #59bdf0;
    box-shadow: 0 0 0 4px rgba(89, 189, 240, .14);
    transform: translateY(-1px);
}

.password-field {
    border: 1px solid #d9e5ef;
    border-radius: 16px;
    background: rgba(255, 255, 255, .98);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.4);
    transition: all .3s ease;
}

.password-field:hover {
    border-color: #b9d8ec;
}

.password-field:focus-within {
    border-color: #59bdf0;
    box-shadow: 0 0 0 4px rgba(89, 189, 240, .14);
    transform: translateY(-1px);
}

.password-field input {
    min-height: 46px;
    border: 0;
    background: transparent;
    box-shadow: none !important;
}

.password-toggle {
    display: inline-grid;
    place-items: center;
    width: 46px;
    min-width: 46px;
    padding: 0;
    color: #4c75ff;
    background: transparent;
    border: 0;
    transition: transform .3s ease, color .3s ease;
}

.password-toggle:hover {
    color: #2568d5;
    transform: scale(1.06);
}

.password-toggle--icon .icon-eye {
    width: 20px;
    height: 20px;
}

.password-toggle--icon .icon-eye--closed {
    display: none;
}

.password-toggle--icon.is-visible .icon-eye--open {
    display: none;
}

.password-toggle--icon.is-visible .icon-eye--closed {
    display: block;
}

.button--primary {
    min-height: 47px;
    border-radius: 16px;
    background: linear-gradient(90deg, #2f74ea 0%, #37afe8 100%);
    box-shadow: 0 14px 26px rgba(38, 111, 231, .22);
    font-family: "Manrope", "Inter", sans-serif;
    font-size: .95rem;
    font-weight: 800;
    letter-spacing: -.01em;
    transition: all .3s ease;
}

.button--primary:hover {
    transform: scale(1.02);
    filter: brightness(1.02);
    box-shadow: 0 18px 32px rgba(38, 111, 231, .28);
}

.login-footer-note {
    display: grid;
    gap: .35rem;
    margin-top: 1rem;
    padding-top: .92rem;
    border-top: 1px solid #d7e1ea;
    text-align: center;
    color: #7f8fa2;
    font-size: .68rem;
}

.login-footer-note span {
    white-space: nowrap;
}

.system-alert {
    margin-bottom: .9rem;
    border-radius: 14px;
    box-shadow: none;
}




@keyframes logoBlinkSoft {
    0%, 88%, 100% {
        opacity: 1;
        filter: drop-shadow(0 8px 14px rgba(30, 100, 201, .08));
    }

    90% {
        opacity: .72;
        filter: drop-shadow(0 8px 22px rgba(53, 184, 235, .30));
    }

    92% {
        opacity: 1;
        filter: drop-shadow(0 8px 14px rgba(30, 100, 201, .08));
    }

    94% {
        opacity: .78;
        filter: drop-shadow(0 8px 22px rgba(53, 184, 235, .25));
    }

    96% {
        opacity: 1;
        filter: drop-shadow(0 8px 14px rgba(30, 100, 201, .08));
    }
}

@keyframes elegantReveal {
    from {
        opacity: 0;
        transform: translateY(22px);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes elegantRevealCard {
    from {
        opacity: 0;
        transform: translateY(24px) scale(.985);
        filter: blur(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes premiumPulse {
    0%, 100% {
        opacity: .45;
        transform: scale(.88);
        box-shadow: 0 0 0 0 rgba(108, 230, 255, .12);
    }
    50% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0 7px rgba(108, 230, 255, .20);
    }
}

@media (max-width: 980px) {
    .login-layout {
        grid-template-columns: 1fr;
    }

    .login-showcase {
        min-height: 50vh;
        padding: 1.7rem 1.5rem .8rem;
        align-items: flex-end;
    }

    .showcase-kicker {
        margin-bottom: .85rem;
    }

    .showcase-logo-mobile {
        display: block;
        width: 180px;
        max-width: 100%;
        margin-bottom: 1rem;
    }

    .showcase-copy h1,
    .showcase-copy h2 {
        font-size: clamp(1.9rem, 6vw, 3rem);
    }

    .showcase-copy h2 {
        margin-top: 1.2rem;
    }

    .showcase-copy p {
        max-width: 100%;
        font-size: .92rem;
    }

    .login-side {
        padding: 0 1.2rem 1.5rem;
        margin-top: -8px;
    }

    .login-card {
        max-width: 360px;
    }
}

@media (max-width: 560px) {
    .login-showcase {
        min-height: 42vh;
        padding: 1.2rem 1rem .75rem;
    }

    .showcase-kicker {
        font-size: .7rem;
        letter-spacing: .1em;
    }

    .showcase-copy h1,
    .showcase-copy h2 {
        font-size: 1.86rem;
    }

    .showcase-copy h2 {
        margin-top: 1rem;
    }

    .showcase-copy p {
        margin-top: 1rem;
        font-size: .88rem;
        line-height: 1.58;
    }

    .login-side {
        padding: 0 .9rem 1rem;
    }

    .login-card {
        max-width: none;
        padding: 1.22rem 1rem 1rem;
        border-radius: 24px;
    }

    .login-card__logo {
        width: 112px;
    }

    .login-card__header h3,
    .login-card__header p,
    .login-footer-note span {
        white-space: normal;
    }
}


/* Ajuste do botão de senha: ícone -> Ocultar -> ícone, sem quebrar o layout premium */
.password-toggle {
    width: 54px;
    min-width: 54px;
    max-width: 54px;
    padding: 0 .28rem;
    overflow: hidden;
}

.password-toggle__text {
    display: inline-block;
    width: 100%;
    color: #4c75ff;
    font-size: .64rem;
    font-weight: 850;
    line-height: 1;
    letter-spacing: -.02em;
    text-align: center;
    white-space: nowrap;
}

.password-toggle.is-visible:hover .password-toggle__text {
    color: #2568d5;
}

/* Login multiempresa: mostra escolha somente depois de validar senha */
.login-card--selection {
    max-width: 380px;
}

.company-choice {
    display: grid;
    gap: .9rem;
}

.company-code-confirmation {
    gap: 1rem;
}

.company-code-confirmation__notice {
    display: grid;
    gap: .4rem;
    padding: 1rem 1.05rem;
    border: 1px solid #cfe3f5;
    border-radius: 16px;
    background: linear-gradient(145deg, #f8fcff 0%, #eef7ff 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

.company-code-confirmation__notice strong {
    color: #173a63;
    font-size: .88rem;
    font-weight: 850;
    line-height: 1.35;
}

.company-code-confirmation__notice span {
    color: #435f7b;
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.45;
}

.company-code-confirmation__notice small {
    color: #75601f;
    font-size: .74rem;
    font-weight: 750;
    line-height: 1.45;
}

.company-code-confirmation__field input {
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 800;
}

.company-choice__list {
    display: grid;
    gap: .62rem;
    max-height: 270px;
    overflow: auto;
    padding-right: .2rem;
}

.company-choice__item {
    position: relative;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: .7rem;
    align-items: center;
    padding: .82rem .85rem;
    border: 1px solid #d8e6f2;
    border-radius: 16px;
    background: rgba(255, 255, 255, .95);
    color: #1f3650;
    cursor: pointer;
    transition: all .25s ease;
}

.company-choice__item:hover {
    border-color: #9dcdf0;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(30, 107, 202, .10);
}

.company-choice__item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.company-choice__mark {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid #aac5db;
    background: #fff;
    box-shadow: inset 0 0 0 4px #fff;
    transition: all .2s ease;
}

.company-choice__item:has(input:checked) {
    border-color: #4aaeed;
    background: linear-gradient(180deg, #ffffff 0%, #eef8ff 100%);
    box-shadow: 0 12px 24px rgba(38, 111, 231, .12);
}

.company-choice__item:has(input:checked) .company-choice__mark {
    border-color: #2f74ea;
    background: #2f74ea;
}

.company-choice__content {
    display: grid;
    gap: .18rem;
    min-width: 0;
}

.company-choice__content strong {
    overflow: hidden;
    color: #173250;
    font-size: .88rem;
    font-weight: 850;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.company-choice__content small {
    overflow: hidden;
    color: #6e8298;
    font-size: .72rem;
    font-weight: 650;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.login-back-link {
    justify-self: center;
    color: #53718c;
    font-size: .76rem;
    font-weight: 750;
    text-decoration: none;
    transition: color .2s ease;
}

.login-back-link:hover {
    color: #2568d5;
}

@supports not selector(:has(*)) {
    .company-choice__item input:checked + .company-choice__mark {
        border-color: #2f74ea;
        background: #2f74ea;
    }
}

/* =========================================================
   LOGIN RESPONSIVO — CELULAR E TABLET
   Mantém o layout desktop original e otimiza toque, teclado
   virtual, orientação horizontal e áreas seguras do aparelho.
   ========================================================= */

@media (max-width: 980px) {
    html {
        min-height: 100%;
        background: #082f68;
    }

    .login-page {
        min-height: 100svh;
        min-height: 100dvh;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        background-position: center center;
        -webkit-text-size-adjust: 100%;
    }

    .login-layout {
        min-height: 100svh;
        min-height: 100dvh;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto 1fr;
    }

    .login-showcase {
        min-height: 260px;
        padding:
            max(1.35rem, env(safe-area-inset-top))
            max(1.35rem, env(safe-area-inset-right))
            3.8rem
            max(1.35rem, env(safe-area-inset-left));
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    .showcase-content {
        width: min(100%, 620px);
        max-width: 620px;
    }

    .showcase-kicker {
        justify-content: center;
        margin-bottom: .75rem;
        font-size: .72rem;
    }

    .showcase-logo-mobile {
        width: clamp(132px, 28vw, 178px);
        margin: 0 auto .7rem;
    }

    .showcase-copy h1,
    .showcase-copy h2 {
        font-size: clamp(1.75rem, 5.4vw, 2.7rem);
        line-height: 1.02;
    }

    .showcase-copy h2 {
        margin-top: .72rem;
    }

    .showcase-copy p {
        max-width: 540px;
        margin: .85rem auto 0;
        font-size: .88rem;
        line-height: 1.55;
    }

    .login-side {
        min-width: 0;
        align-items: flex-start;
        padding:
            0
            max(1rem, env(safe-area-inset-right))
            max(1.4rem, env(safe-area-inset-bottom))
            max(1rem, env(safe-area-inset-left));
        margin-top: -2.7rem;
    }

    .login-card,
    .login-card--selection {
        width: min(100%, 430px);
        max-width: 430px;
        padding: 1.35rem 1.2rem 1.08rem;
        border-radius: 25px;
        box-shadow:
            0 28px 64px rgba(0, 0, 0, .30),
            0 12px 28px rgba(0, 0, 0, .16),
            inset 0 1px 0 rgba(255, 255, 255, .58);
    }

    .login-card:hover {
        transform: none;
    }

    .login-card__logo-wrap,
    .login-card__logo {
        width: 118px;
    }

    .login-card__header {
        margin-bottom: 1rem;
    }

    .login-card__header h3,
    .login-card__header p,
    .login-footer-note span {
        white-space: normal;
    }

    .field--minimal input,
    .password-field,
    .password-field input {
        min-height: 52px;
    }

    .field--minimal input,
    .password-field input {
        font-size: 16px;
    }

    .password-toggle {
        width: 52px;
        min-width: 52px;
        min-height: 50px;
        touch-action: manipulation;
    }

    .button--primary,
    .company-choice .button {
        min-height: 52px;
        font-size: 1rem;
        touch-action: manipulation;
    }

    .company-choice__item {
        min-height: 62px;
        padding: .82rem .86rem;
        touch-action: manipulation;
    }

    .company-choice__list {
        max-height: min(42vh, 360px);
        -webkit-overflow-scrolling: touch;
    }

    .login-back-link {
        min-height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .login-showcase {
        min-height: 205px;
        padding:
            max(.9rem, env(safe-area-inset-top))
            max(1rem, env(safe-area-inset-right))
            3.15rem
            max(1rem, env(safe-area-inset-left));
    }

    .showcase-kicker {
        margin-bottom: .55rem;
        font-size: .64rem;
        letter-spacing: .095em;
    }

    .showcase-kicker::before {
        width: 8px;
        height: 8px;
        box-shadow: 0 0 0 5px rgba(108, 230, 255, .15);
    }

    .showcase-logo-mobile {
        width: 132px;
        margin-bottom: .45rem;
    }

    .showcase-copy h1 {
        font-size: clamp(1.52rem, 7vw, 1.92rem);
    }

    .showcase-copy h2 {
        display: none;
    }

    .showcase-copy p {
        max-width: 330px;
        margin-top: .55rem;
        font-size: .78rem;
        line-height: 1.42;
    }

    .login-side {
        margin-top: -2.35rem;
        padding-inline:
            max(.78rem, env(safe-area-inset-left))
            max(.78rem, env(safe-area-inset-right));
    }

    .login-card,
    .login-card--selection {
        width: 100%;
        max-width: 440px;
        padding: 1.18rem .95rem .95rem;
        border-radius: 22px;
    }

    .login-card::before {
        border-radius: 22px;
    }

    .login-card__logo-wrap,
    .login-card__logo {
        width: 106px;
    }

    .login-card__logo-wrap {
        margin-bottom: .65rem;
    }

    .login-card__header h3 {
        font-size: 1.08rem;
    }

    .login-card__header p {
        font-size: .78rem;
    }

    .login-form {
        gap: .72rem;
    }

    .field--minimal input {
        padding: .82rem .88rem;
        border-radius: 14px;
    }

    .password-field {
        border-radius: 14px;
    }

    .button--primary {
        border-radius: 14px;
    }

    .login-footer-note {
        margin-top: .85rem;
        padding-top: .78rem;
        font-size: .64rem;
        line-height: 1.35;
    }

    .system-alert {
        font-size: .82rem;
        line-height: 1.4;
    }

    .company-choice__list {
        max-height: min(38vh, 300px);
    }

    .company-choice__content strong,
    .company-choice__content small {
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 390px) {
    .login-showcase {
        min-height: 180px;
        padding-bottom: 2.8rem;
    }

    .showcase-logo-mobile {
        width: 116px;
    }

    .showcase-copy h1 {
        font-size: 1.42rem;
    }

    .showcase-copy p {
        display: none;
    }

    .login-card,
    .login-card--selection {
        padding-inline: .82rem;
    }

    .login-card__logo-wrap,
    .login-card__logo {
        width: 96px;
    }
}

/* Teclado virtual aberto / aparelhos baixos */
@media (max-width: 980px) and (max-height: 700px) {
    .login-layout {
        display: block;
    }

    .login-showcase {
        min-height: 130px;
        padding-top: max(.7rem, env(safe-area-inset-top));
        padding-bottom: 2.2rem;
    }

    .showcase-kicker,
    .showcase-copy,
    .showcase-logo-mobile {
        display: none;
    }

    .login-side {
        margin-top: -1.5rem;
        min-height: auto;
    }

    .login-card,
    .login-card--selection {
        margin-bottom: max(.8rem, env(safe-area-inset-bottom));
    }
}

/* Celular deitado */
@media (max-width: 980px) and (orientation: landscape) and (max-height: 520px) {
    .login-layout {
        display: grid;
        grid-template-columns: minmax(180px, .75fr) minmax(330px, 1.25fr);
        min-height: 100dvh;
    }

    .login-showcase {
        min-height: 100dvh;
        padding: max(.8rem, env(safe-area-inset-top)) 1rem max(.8rem, env(safe-area-inset-bottom));
    }

    .showcase-kicker,
    .showcase-copy p,
    .showcase-copy h2 {
        display: none;
    }

    .showcase-logo-mobile {
        display: block;
        width: min(128px, 24vw);
        margin: 0 auto .55rem;
    }

    .showcase-copy h1 {
        display: block;
        font-size: clamp(1.28rem, 3.3vw, 1.75rem);
    }

    .login-side {
        min-height: 100dvh;
        align-items: center;
        margin-top: 0;
        padding:
            max(.65rem, env(safe-area-inset-top))
            max(.9rem, env(safe-area-inset-right))
            max(.65rem, env(safe-area-inset-bottom))
            .7rem;
    }

    .login-card,
    .login-card--selection {
        max-width: 420px;
        padding: .9rem 1rem .8rem;
    }

    .login-card__logo-wrap,
    .login-card__logo {
        width: 86px;
    }

    .login-card__logo-wrap,
    .login-card__header,
    .login-footer-note {
        margin-bottom: .55rem;
    }

    .login-footer-note {
        margin-top: .65rem;
        padding-top: .6rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .showcase-content,
    .login-card,
    .showcase-kicker::before,
    .login-card__logo {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .login-card,
    .button--primary,
    .field--minimal input,
    .password-field,
    .company-choice__item {
        transition-duration: .01ms !important;
    }
}

/* Modal profissional de limite de conexões */
.has-connection-modal {
    overflow: hidden;
}

.has-connection-modal .login-layout {
    filter: blur(3px) saturate(.88);
    transform: scale(.995);
    transition: filter .22s ease, transform .22s ease;
    pointer-events: none;
    user-select: none;
}

.connection-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 24px;
    isolation: isolate;
}

.connection-modal__backdrop {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 50% 35%, rgba(20, 121, 232, .18), transparent 36%),
        rgba(3, 17, 37, .68);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
    animation: connectionBackdropIn .22s ease both;
}

.connection-modal__dialog {
    position: relative;
    width: min(100%, 660px);
    max-height: calc(100vh - 48px);
    overflow: auto;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 28px;
    color: #11233c;
    background:
        linear-gradient(145deg, rgba(255,255,255,.99), rgba(243,248,255,.98));
    box-shadow:
        0 42px 90px rgba(1, 15, 35, .38),
        0 12px 34px rgba(11, 91, 181, .18),
        inset 0 1px 0 rgba(255,255,255,.9);
    outline: none;
    animation: connectionDialogIn .34s cubic-bezier(.2,.85,.25,1) both;
}

.connection-modal__dialog:focus-visible {
    box-shadow:
        0 42px 90px rgba(1, 15, 35, .38),
        0 12px 34px rgba(11, 91, 181, .18),
        0 0 0 4px rgba(56, 189, 248, .22);
}

.connection-modal__accent {
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    border-radius: 28px 28px 0 0;
    background: linear-gradient(90deg, #38bdf8 0%, #1678e7 48%, #0f4db8 100%);
}

.connection-modal__header {
    display: flex;
    align-items: center;
    gap: 17px;
    margin-bottom: 18px;
}

.connection-modal__icon {
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 19px;
    color: #fff;
    background: linear-gradient(145deg, #42c6f6, #176fe0 62%, #114bb3);
    box-shadow: 0 15px 30px rgba(21, 101, 211, .26);
}

.connection-modal__icon svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.connection-modal__eyebrow {
    display: block;
    margin-bottom: 5px;
    color: #176fd5;
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.connection-modal__header h2 {
    margin: 0;
    color: #0b1f3a;
    font-family: "Manrope", "Inter", sans-serif;
    font-size: clamp(1.35rem, 3.2vw, 1.85rem);
    line-height: 1.14;
    letter-spacing: -.035em;
}

.connection-modal__description {
    margin: 0 0 20px;
    color: #42556f;
    font-size: .94rem;
    line-height: 1.62;
}

.connection-modal__summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.connection-modal__metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 66px;
    padding: 13px 16px;
    border: 1px solid rgba(72, 116, 173, .16);
    border-radius: 17px;
    background: rgba(255,255,255,.72);
    box-shadow: 0 8px 21px rgba(39, 91, 148, .07);
}

.connection-modal__metric span {
    color: #657891;
    font-size: .76rem;
    font-weight: 780;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.connection-modal__metric strong {
    min-width: 38px;
    color: #0a56bb;
    font-family: "Manrope", "Inter", sans-serif;
    font-size: 1.55rem;
    line-height: 1;
    text-align: right;
}

.connection-modal__session {
    padding: 17px;
    border: 1px solid rgba(36, 110, 196, .17);
    border-radius: 19px;
    background: linear-gradient(145deg, rgba(233,245,255,.78), rgba(255,255,255,.9));
}

.connection-modal__session-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 13px;
    color: #173858;
    font-size: .84rem;
}

.connection-modal__session-dot {
    position: relative;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #19a766;
    box-shadow: 0 0 0 5px rgba(25, 167, 102, .13);
}

.connection-modal__session-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(120px, .75fr);
    gap: 13px 20px;
    margin: 0;
}

.connection-modal__session-grid > div:last-child:nth-child(3) {
    grid-column: 1 / -1;
}

.connection-modal__session-grid dt {
    margin-bottom: 4px;
    color: #718198;
    font-size: .67rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.connection-modal__session-grid dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: #203955;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.4;
}

.connection-modal__notice {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 15px 0 20px;
    padding: 11px 13px;
    border-radius: 14px;
    color: #5a6980;
    background: rgba(226, 232, 240, .55);
    font-size: .76rem;
    line-height: 1.45;
}

.connection-modal__notice svg {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    margin-top: 1px;
    fill: none;
    stroke: #54718f;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.connection-modal__actions {
    display: grid;
    grid-template-columns: minmax(150px, .72fr) minmax(260px, 1.28fr);
    gap: 12px;
}

.connection-modal__button {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 17px;
    border: 0;
    border-radius: 15px;
    font-family: inherit;
    font-size: .84rem;
    font-weight: 830;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, filter .18s ease;
}

.connection-modal__button:hover {
    transform: translateY(-2px);
}

.connection-modal__button:focus-visible {
    outline: 3px solid rgba(56, 189, 248, .3);
    outline-offset: 2px;
}

.connection-modal__button--secondary {
    border: 1px solid rgba(74, 101, 136, .2);
    color: #29415d;
    background: rgba(255,255,255,.92);
    box-shadow: 0 8px 20px rgba(23, 53, 86, .07);
}

.connection-modal__button--secondary:hover {
    border-color: rgba(31, 111, 208, .34);
    color: #125fbd;
    box-shadow: 0 11px 23px rgba(23, 84, 150, .11);
}

.connection-modal__button--primary {
    position: relative;
    color: #fff;
    background: linear-gradient(135deg, #2ebaf0 0%, #1676e4 48%, #0a4cb7 100%);
    box-shadow: 0 15px 30px rgba(16, 91, 192, .26);
    text-shadow: 0 1px 2px rgba(0, 30, 78, .34);
    overflow: hidden;
}

.connection-modal__button--primary::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 15%, rgba(255,255,255,.22) 46%, transparent 76%);
    transform: translateX(-120%);
    transition: transform .65s ease;
}

.connection-modal__button--primary:hover {
    filter: brightness(1.04);
    box-shadow: 0 18px 36px rgba(16, 91, 192, .32);
}

.connection-modal__button--primary:hover::before {
    transform: translateX(120%);
}

.connection-modal__button-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
}

.connection-modal__button-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.connection-modal__button--primary > span {
    position: relative;
    z-index: 1;
}

.connection-modal__button:disabled {
    cursor: wait;
    transform: none;
    filter: saturate(.75);
}

.connection-modal__spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.38);
    border-top-color: #fff;
    border-radius: 50%;
    animation: connectionSpin .72s linear infinite;
}

.connection-modal__button.is-loading .connection-modal__button-icon {
    display: none;
}

.connection-modal__button.is-loading .connection-modal__spinner {
    display: inline-block;
}

@keyframes connectionBackdropIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes connectionDialogIn {
    from { opacity: 0; transform: translateY(18px) scale(.965); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes connectionSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 680px) {
    .connection-modal {
        padding: 14px;
        align-items: end;
    }

    .connection-modal__dialog {
        width: 100%;
        max-height: calc(100vh - 28px);
        padding: 25px 20px 20px;
        border-radius: 25px 25px 18px 18px;
    }

    .connection-modal__accent {
        border-radius: 25px 25px 0 0;
    }

    .connection-modal__header {
        align-items: flex-start;
    }

    .connection-modal__icon {
        width: 50px;
        height: 50px;
        border-radius: 16px;
    }

    .connection-modal__summary,
    .connection-modal__actions,
    .connection-modal__session-grid {
        grid-template-columns: 1fr;
    }

    .connection-modal__session-grid > div:last-child:nth-child(3) {
        grid-column: auto;
    }

    .connection-modal__actions {
        display: flex;
        flex-direction: column-reverse;
    }

    .connection-modal__button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .connection-modal__backdrop,
    .connection-modal__dialog,
    .connection-modal__spinner {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
    }

    .connection-modal__button,
    .has-connection-modal .login-layout {
        transition: none !important;
    }
}

/* Adaptação do aviso de conexão para todas as versões */
.connection-modal {
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    padding:
        max(24px, env(safe-area-inset-top))
        max(24px, env(safe-area-inset-right))
        max(24px, env(safe-area-inset-bottom))
        max(24px, env(safe-area-inset-left));
}

.connection-modal__dialog {
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - max(48px, env(safe-area-inset-top) + env(safe-area-inset-bottom) + 24px));
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 900px) {
    .connection-modal__dialog {
        width: min(100%, 620px);
    }
}

@media (max-width: 680px) {
    .connection-modal {
        padding:
            max(10px, env(safe-area-inset-top))
            max(10px, env(safe-area-inset-right))
            max(10px, env(safe-area-inset-bottom))
            max(10px, env(safe-area-inset-left));
    }

    .connection-modal__dialog {
        max-height: calc(100dvh - max(20px, env(safe-area-inset-top) + env(safe-area-inset-bottom)));
    }
}

@media (max-width: 390px) {
    .connection-modal__dialog {
        padding: 22px 16px 16px;
        border-radius: 23px 23px 16px 16px;
    }

    .connection-modal__header {
        gap: 12px;
        margin-bottom: 14px;
    }

    .connection-modal__icon {
        width: 46px;
        height: 46px;
    }

    .connection-modal__header h2 {
        font-size: 1.24rem;
    }

    .connection-modal__description {
        margin-bottom: 15px;
        font-size: .86rem;
        line-height: 1.5;
    }

    .connection-modal__metric {
        min-height: 58px;
        padding: 11px 13px;
    }

    .connection-modal__session,
    .connection-modal__notice {
        padding: 13px;
    }
}

@media (max-width: 980px) and (orientation: landscape) and (max-height: 520px) {
    .connection-modal {
        align-items: center;
        padding: 8px max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
    }

    .connection-modal__dialog {
        width: min(100%, 760px);
        max-height: calc(100dvh - 16px);
        padding: 18px 22px;
        border-radius: 20px;
    }

    .connection-modal__accent {
        border-radius: 20px 20px 0 0;
    }

    .connection-modal__header {
        margin-bottom: 11px;
    }

    .connection-modal__description {
        margin-bottom: 12px;
        line-height: 1.42;
    }

    .connection-modal__session,
    .connection-modal__notice {
        padding-block: 10px;
    }

    .connection-modal__notice {
        margin: 10px 0 12px;
    }

    .connection-modal__button {
        min-height: 46px;
    }
}


/* v20260722-glow-pulse: pulso com brilho mais evidente no login */
.showcase-kicker::before {
    animation: premiumPulse 1.18s cubic-bezier(.22,.85,.2,1) infinite;
}

@keyframes premiumPulse {
    0%, 100% {
        opacity: .96;
        transform: scale(.92);
        box-shadow:
            0 0 0 0 rgba(108, 230, 255, .36),
            0 0 16px rgba(108, 230, 255, .72),
            0 0 34px rgba(25, 164, 255, .34);
        filter: saturate(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.14);
        box-shadow:
            0 0 0 10px rgba(108, 230, 255, 0),
            0 0 26px rgba(108, 230, 255, .96),
            0 0 48px rgba(25, 164, 255, .52);
        filter: saturate(1.12);
    }
}
