/* Tela de acesso: estilos isolados para preservar as demais telas do SIGEC. */
.login-layout {
    --login-background: #f2f5fb;
    --login-foreground: #101d31;
    --login-muted: #62738d;
    --login-card: rgb(255 255 255 / 88%);
    --login-card-border: rgb(210 220 234 / 82%);
    --login-field: rgb(255 255 255 / 78%);
    --login-field-border: #cbd6e5;
    --login-art: url("../img/login-claro-desktop.png");

    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(440px, .96fr);
    min-height: 100vh;
    min-height: 100svh;
    overflow: hidden;
    color: var(--login-foreground);
    background: var(--login-background);
}

html[data-theme="dark"] .login-layout {
    --login-background: #061725;
    --login-foreground: #f5f8fc;
    --login-muted: #a8b7ca;
    --login-card: rgb(11 26 40 / 88%);
    --login-card-border: rgb(134 158 184 / 32%);
    --login-field: rgb(4 19 32 / 58%);
    --login-field-border: #60758a;
    --login-art: url("../img/login-escuro-desktop.png");
}

.login-layout::before {
    position: absolute;
    z-index: 0;
    inset: 0;
    background-image: var(--login-art);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    content: "";
    pointer-events: none;
}

.login-showcase,
.login-panel {
    position: relative;
    z-index: 1;
    min-width: 0;
    background: transparent;
}

.login-showcase {
    display: flex;
    align-items: center;
    padding-block: 0;
    padding-inline: clamp(34px, 6.5vw, 108px);
    color: var(--login-foreground);
}

.showcase-content {
    display: flex;
    width: min(100%, 500px);
    height: 100svh;
    min-height: 0;
    margin-inline: auto;
    flex-direction: column;
    justify-content: space-between;
    gap: 36px;
    padding-block: clamp(30px, 10vh, 96px);
}

.company-logo {
    align-self: flex-start;
    color: inherit;
}

.logo-frame {
    display: block;
    width: clamp(210px, 17vw, 290px);
    height: auto;
    overflow: visible;
    transform: none;
    border-radius: 0;
    box-shadow: none;
}

.company-logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.showcase-message {
    max-width: 470px;
}

.platform-name {
    margin: 0 0 5px;
    color: #ff6814;
    font-size: .92rem;
    font-weight: 850;
    letter-spacing: .18em;
}

.showcase-message h1 {
    margin: 0;
    color: var(--login-foreground);
    font-size: clamp(2.45rem, 3.4vw, 3.75rem);
    font-weight: 780;
    line-height: 1.08;
    letter-spacing: -.052em;
}

.orange-rule {
    width: 64px;
    height: 4px;
    margin: 23px 0 18px;
    background: linear-gradient(90deg, #ff8a00, #ff4d00);
}

.showcase-message > p:not(.platform-name) {
    max-width: 430px;
    margin: 0;
    color: var(--login-foreground);
    font-size: clamp(.98rem, 1.1vw, 1.08rem);
    line-height: 1.55;
}

.feature-list {
    display: flex;
    max-width: 440px;
    gap: 16px;
}

.feature {
    display: grid;
    min-width: 0;
    min-height: 104px;
    flex: 1;
    align-content: center;
    justify-items: center;
    gap: 10px;
    padding: 12px 10px;
    border: 1px solid rgb(128 153 180 / 24%);
    border-radius: 15px;
    color: var(--login-foreground);
    background: rgb(255 255 255 / 42%);
    box-shadow: 0 8px 24px rgb(15 32 55 / 8%);
    font-size: .83rem;
    font-weight: 650;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
}

.feature-icon {
    display: grid;
    width: 45px;
    height: 45px;
    place-items: center;
    border-radius: 50%;
    color: #ff6814;
    background: rgb(255 255 255 / 78%);
}

.feature-icon i {
    color: inherit;
    font-size: 1.65rem;
    line-height: 1;
}

.feature > span:last-child {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

html[data-theme="dark"] .login-showcase::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(110deg, rgb(3 16 29 / 35%), transparent 75%);
    content: "";
    pointer-events: none;
}

html[data-theme="dark"] .feature {
    border-color: rgb(145 168 192 / 23%);
    background: rgb(18 36 52 / 78%);
    box-shadow: 0 8px 25px rgb(0 0 0 / 16%);
}

html[data-theme="dark"] .feature-icon {
    background: rgb(255 255 255 / 8%);
}

.login-panel {
    display: grid;
    align-items: center;
    justify-items: center;
    padding: clamp(26px, 4vw, 64px);
    background: linear-gradient(90deg, rgb(245 248 253 / 12%), rgb(245 248 253 / 42%));
}

.login-card,
html[data-theme="dark"] .login-layout .login-card {
    width: min(100%, 475px);
    padding: clamp(30px, 3vw, 46px);
    border: 1px solid var(--login-card-border);
    border-radius: 24px;
    color: var(--login-foreground);
    background: var(--login-card);
    box-shadow: 0 22px 60px rgb(23 39 66 / 14%);
    backdrop-filter: blur(16px);
}

html[data-theme="dark"] .login-panel {
    background: linear-gradient(90deg, rgb(4 17 29 / 20%), rgb(4 17 29 / 52%));
}

html[data-theme="dark"] .login-layout .login-panel {
    background: linear-gradient(90deg, rgb(4 17 29 / 20%), rgb(4 17 29 / 52%));
}

html[data-theme="dark"] .login-layout .login-card {
    box-shadow: 0 24px 66px rgb(0 0 0 / 32%);
}

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

.login-heading h2 {
    margin: 0 0 5px;
    color: var(--login-foreground);
    font-size: clamp(1.7rem, 2.3vw, 2rem);
    font-weight: 780;
    letter-spacing: -.04em;
}

.login-heading p {
    margin: 0;
    color: var(--login-muted);
    font-size: 1rem;
}

.login-form {
    display: grid;
    gap: 10px;
}

.login-form > label {
    margin-top: 7px;
    color: var(--login-foreground);
    font-size: .9rem;
    font-weight: 700;
}

.input-wrap > i,
.password-toggle {
    color: var(--login-muted);
}

.input-wrap input {
    height: 50px;
    border-color: var(--login-field-border);
    color: var(--login-foreground);
    background: var(--login-field);
    font-size: .96rem;
}

.input-wrap input::placeholder {
    color: var(--login-muted);
}

.input-wrap input:focus {
    border-color: #ff6814;
    box-shadow: 0 0 0 3px rgb(255 104 20 / 18%);
}

.input-wrap input:-webkit-autofill,
.input-wrap input:-webkit-autofill:hover,
.input-wrap input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--login-foreground);
    box-shadow: 0 0 0 1000px var(--login-field) inset;
    transition: background-color 9999s ease-out 0s;
}

.form-options {
    margin: 5px 0 19px;
    gap: 12px;
}

.remember {
    color: var(--login-foreground);
    font-size: .88rem;
}

.remember input {
    width: 17px;
    height: 17px;
}

.text-action {
    color: #0875e1;
    font-size: .87rem;
}

html[data-theme="dark"] .text-action {
    color: #69aaff;
}

.login-submit {
    height: 50px;
    border-radius: 9px;
    background: linear-gradient(100deg, #ff8a00, #ff4d00);
    box-shadow: 0 8px 20px rgb(255 91 0 / 26%);
    font-size: 1rem;
}

.login-submit:hover {
    background: linear-gradient(100deg, #f47a00, #eb4300);
}

.or-divider {
    margin: 20px 0;
    color: var(--login-muted);
}

.or-divider::before,
.or-divider::after {
    background: var(--login-card-border);
}

.sso-button {
    height: 48px;
    border-color: var(--login-field-border);
    color: var(--login-foreground);
    background: var(--login-field);
    font-size: .95rem;
}

.sso-button:hover {
    border-color: #ff6814;
    background: var(--login-card);
}

.login-card footer {
    margin-top: 25px;
    color: var(--login-muted);
    font-size: .75rem;
}

.login-card .alert {
    margin: -9px 0 17px;
}

@media (max-width: 940px) {
    .login-layout {
        grid-template-columns: minmax(0, 1fr) minmax(390px, .95fr);
    }

    .login-showcase {
        padding-inline: 34px;
    }

    .login-panel {
        padding-inline: 28px;
    }

    .feature-list {
        gap: 9px;
    }

    .feature {
        font-size: .74rem;
    }
}

@media (max-width: 820px) {
    .login-layout {
        --login-art: url("../img/login-claro-mobile.png");
        width: 100%;
        max-width: 100%;
        grid-template-columns: minmax(0, 1fr);
        align-content: start;
    }

    html[data-theme="dark"] .login-layout {
        --login-art: url("../img/login-escuro-mobile.png");
    }

    .login-showcase {
        min-height: 0;
        padding: 28px 26px 10px;
    }

    .showcase-content {
        width: min(100%, 500px);
        height: auto;
        min-height: 0;
        gap: 24px;
        padding-block: 0;
    }

    .company-logo {
        align-self: center;
    }

    .logo-frame {
        width: min(220px, 58vw);
    }

    .showcase-message {
        max-width: 500px;
    }

    .showcase-message h1 {
        font-size: clamp(2rem, 7vw, 2.6rem);
    }

    .orange-rule {
        margin: 15px 0 12px;
    }

    .showcase-message > p:not(.platform-name) {
        max-width: 460px;
        font-size: .95rem;
    }

    .feature-list {
        display: none;
    }

    .login-panel {
        min-height: 0;
        width: 100%;
        max-width: 100%;
        padding: 14px 24px 38px;
        background: transparent;
    }

    html[data-theme="dark"] .login-layout .login-panel {
        background: transparent;
    }

    .login-card,
    html[data-theme="dark"] .login-layout .login-card {
        width: min(100%, 500px);
        min-width: 0;
        padding: clamp(24px, 6vw, 36px);
        border-radius: 20px;
    }

    .login-form,
    .input-wrap {
        min-width: 0;
        max-width: 100%;
    }
}

@media (max-height: 780px) and (min-width: 821px) {
    .showcase-content {
        gap: 18px;
        padding-block: 24px;
    }

    .feature {
        min-height: 88px;
        padding-block: 8px;
    }

    .feature-icon {
        width: 38px;
        height: 38px;
    }

    .feature-icon i {
        font-size: 1.4rem;
    }

    .login-card,
    html[data-theme="dark"] .login-layout .login-card {
        padding-block: 26px;
    }

    .login-heading {
        margin-bottom: 20px;
    }

    .login-card footer {
        margin-top: 18px;
    }
}

@media (max-width: 520px) {
    .login-showcase {
        min-height: 0;
        padding: 23px 22px 8px;
    }

    .showcase-content {
        gap: 18px;
    }

    .showcase-message h1 {
        font-size: 2rem;
    }

    .login-panel {
        padding: 12px 18px 30px;
    }

    .login-card,
    html[data-theme="dark"] .login-layout .login-card {
        padding: 24px 21px;
    }

    .login-heading {
        margin-bottom: 21px;
    }

    .form-options {
        align-items: center;
        flex-direction: row;
        flex-wrap: wrap;
        margin-bottom: 17px;
    }

    .login-card footer {
        margin-top: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-layout *,
    .login-layout *::before,
    .login-layout *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
