:root {
    color-scheme: light;
    font-family: "Inter", "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

button,
input {
    font: inherit;
}

.login-page {
    min-height: 100vh;
    color: #26364c;
    background: #f3f7fb;
}

.loading-overlay {
    position: fixed;
    z-index: 9999;
    display: grid;
    visibility: hidden;
    inset: 0;
    place-items: center;
    padding: 1.5rem;
    opacity: 0;
    background: rgba(13, 23, 37, 0.72);
    backdrop-filter: blur(8px);
    transition: visibility 0.2s ease, opacity 0.2s ease;
}

.loading-overlay.show {
    visibility: visible;
    opacity: 1;
}

.loading-animation {
    display: flex;
    height: 4.5rem;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.loading-animation span {
    width: 0.55rem;
    height: 1.5rem;
    border-radius: 0.4rem;
    background: linear-gradient(180deg, #58a0ff, #267ceb);
    box-shadow: 0 0 18px rgba(38, 124, 235, 0.6);
    animation: loading-wave 1.1s ease-in-out infinite;
}

.loading-animation span:nth-child(2) {
    animation-delay: 0.1s;
}

.loading-animation span:nth-child(3) {
    animation-delay: 0.2s;
}

.loading-animation span:nth-child(4) {
    animation-delay: 0.3s;
}

.loading-animation span:nth-child(5) {
    animation-delay: 0.4s;
}

@keyframes loading-wave {
    0%,
    100% {
        height: 1.5rem;
        opacity: 0.45;
    }

    50% {
        height: 4.5rem;
        opacity: 1;
    }
}

.login-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(22rem, 0.9fr) minmax(30rem, 1.1fr);
}

.login-presentation {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    padding: 3rem clamp(2.5rem, 5vw, 6rem);
    overflow: hidden;
    color: #f6f9fd;
    background: linear-gradient(150deg, #172840 0%, #111d2e 55%, #0d1725 100%);
}

.login-presentation::before,
.login-presentation::after {
    position: absolute;
    content: "";
    border-radius: 9999px;
    pointer-events: none;
}

.login-presentation::before {
    top: -10rem;
    right: -9rem;
    width: 30rem;
    height: 30rem;
    background: rgba(38, 124, 235, 0.22);
    filter: blur(1rem);
}

.login-presentation::after {
    bottom: -14rem;
    left: -10rem;
    width: 34rem;
    height: 34rem;
    background: rgba(25, 157, 173, 0.13);
    filter: blur(1.5rem);
}

.login-brand,
.login-presentation-content,
.login-presentation-footer {
    position: relative;
    z-index: 1;
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 44rem;
    margin-top: 2.5rem;
    gap: 1rem;
    text-align: left;
}

.login-brand-icon {
    display: grid;
    width: 3.5rem;
    height: 3.5rem;
    place-items: center;
    border-radius: 1rem;
    color: #ffffff;
    background: #267ceb;
    box-shadow: 0 14px 28px rgba(38, 124, 235, 0.3);
}

.login-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.login-brand-copy strong {
    font-size: 1.15rem;
}

.login-brand-copy small,
.login-presentation-footer {
    color: #9fb0c5;
}

.login-presentation-content {
    max-width: 44rem;
}

.login-eyebrow {
    display: inline-block;
    margin-bottom: 1rem;
    color: #58a0ff;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.login-presentation h1 {
    max-width: 44rem;
    margin: 0;
    font-size: clamp(2.4rem, 4.5vw, 4.7rem);
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.login-presentation p {
    width: 100%;
    max-width: 44rem;
    margin: 1.6rem 0 0;
    color: #bdc9d8;
    font-size: 1.05rem;
    line-height: 1.75;
}

.login-benefits {
    display: flex;
    width: 100%;
    max-width: 44rem;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
    margin-top: 2rem;
}

.login-benefits span {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.8rem;
    color: #dfe8f2;
    background: rgba(255, 255, 255, 0.045);
}

.login-benefits i {
    color: #58a0ff;
}

.login-presentation-footer {
    width: 100%;
    max-width: 44rem;
    text-align: center;
    line-height: 1.7;
}

.login-presentation-footer i {
    color: #58a0ff;
}

.login-presentation-footer .login-footer-heart {
    color: #ef4444;
}

.login-presentation-footer .login-footer-coffee {
    color: #d69e5f;
}

.login-presentation-footer a {
    color: #58a0ff;
    font-weight: 700;
    text-decoration: none;
}

.login-presentation-footer a:hover {
    text-decoration: underline;
}

.login-access {
    position: relative;
    display: grid;
    min-height: 100vh;
    padding: 2rem;
    place-items: center;
    overflow: hidden;
}

.login-access::before {
    position: absolute;
    top: 8%;
    right: 8%;
    width: 18rem;
    height: 18rem;
    content: "";
    border-radius: 9999px;
    background: rgba(38, 124, 235, 0.08);
    filter: blur(0.5rem);
}

.login-card {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(100%, 29rem);
    height: 40rem;
    flex-direction: column;
    padding: clamp(1.75rem, 4vw, 2.75rem);
    border: 1px solid #dce5ef;
    border-radius: 1.35rem;
    background: #ffffff;
    box-shadow: 0 28px 70px rgba(21, 36, 56, 0.12);
}

.login-card-header {
    margin-bottom: 2rem;
}

.login-reset-card {
    height: auto;
    min-height: 40rem;
}

.login-forgot-card {
    height: auto;
    min-height: 34rem;
}

.login-reset-card.login-reset-invalid {
    min-height: 30rem;
}

.login-card-icon {
    display: grid;
    width: 3rem;
    height: 3rem;
    margin-bottom: 1.5rem;
    place-items: center;
    border-radius: 0.9rem;
    color: #267ceb;
    background: #eaf3ff;
}

.login-card-header .login-eyebrow {
    display: block;
    margin-bottom: 0.65rem;
}

.login-card h2 {
    margin: 0;
    color: #172840;
    font-size: 2rem;
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.login-card-header p {
    margin: 0.65rem 0 0;
    color: #708096;
    line-height: 1.55;
}

.login-field {
    margin-bottom: 1.25rem;
}

.login-field label {
    display: block;
    margin-bottom: 0.5rem;
    color: #34455d;
    font-size: 0.88rem;
    font-weight: 700;
}

.login-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-group > i {
    position: absolute;
    left: 1rem;
    color: #92a1b4;
}

.login-input-group input {
    width: 100%;
    height: 3.35rem;
    padding: 0 3rem;
    border: 1px solid #dce5ef;
    border-radius: 0.8rem;
    color: #26364c;
    background: #f9fbfd;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-input-group input:focus {
    border-color: #267ceb;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(38, 124, 235, 0.12);
}

.login-input-group input::placeholder {
    color: #9aa8b8;
}

.login-password-toggle {
    position: absolute;
    right: 0.65rem;
    display: grid;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 0.65rem;
    color: #708096;
    background: transparent;
    cursor: pointer;
}

.login-password-toggle:hover {
    color: #267ceb;
    background: #eaf3ff;
}

.field-validation-error {
    display: block;
    margin-top: 0.4rem;
    color: #dc3545;
    font-size: 0.8rem;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0.35rem 0 1.5rem;
    font-size: 0.85rem;
}

.login-check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: #708096;
    cursor: pointer;
}

.login-check input {
    width: 1rem;
    height: 1rem;
    accent-color: #267ceb;
}

.login-link {
    padding: 0;
    border: 0;
    color: #267ceb;
    font-weight: 700;
    background: transparent;
    cursor: pointer;
}

.login-link:hover {
    text-decoration: underline;
}

.login-secondary-action {
    margin-top: 1.25rem;
    text-align: center;
}

.login-secondary-action .login-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
}

.login-secondary-action .login-link:hover {
    text-decoration: underline;
}

#frmLogin,
#frmEsqueciMinhaSenha {
    display: flex;
    flex: 1;
    flex-direction: column;
}

#frmLogin .login-submit {
    margin-top: auto;
}

#frmEsqueciMinhaSenha .login-form-actions {
    margin-top: 2rem;
}

#frmRedefinirSenha .login-form-actions {
    margin-top: 2rem;
}

.login-reset-invalid .login-card-header {
    margin-bottom: 0;
}

.login-reset-invalid > .login-form-actions {
    margin-top: 6.5rem;
}

.login-form-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.login-form-actions .login-submit {
    width: auto;
    min-width: 12rem;
    padding: 0 1.4rem;
}

.login-back-action {
    display: inline-flex;
    height: 3.4rem;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0 1.25rem;
    border: 1px solid #dce5ef;
    border-radius: 0.85rem;
    color: #506075;
    font-weight: 700;
    background: #ffffff;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.login-back-action:hover {
    border-color: #b9cee8;
    color: #267ceb;
    background: #f3f8fe;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(38, 124, 235, 0.14);
}

.login-submit {
    display: flex;
    width: 100%;
    height: 3.4rem;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    border: 0;
    border-radius: 0.85rem;
    color: #ffffff;
    font-weight: 800;
    background: linear-gradient(135deg, #267ceb, #1765cf);
    box-shadow: 0 14px 28px rgba(38, 124, 235, 0.24);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 17px 32px rgba(38, 124, 235, 0.3);
}

.login-submit:disabled {
    opacity: 0.72;
    cursor: wait;
}

.login-submit.loading i {
    animation: login-spin 0.8s linear infinite;
}

.login-submit-link {
    text-decoration: none;
}

.login-card-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 1.75rem;
    color: #92a1b4;
    font-size: 0.75rem;
}

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

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

    .login-presentation {
        min-height: auto;
        padding: 1.5rem;
    }

    .login-presentation-content,
    .login-presentation-footer {
        display: none;
    }

    .login-access {
        min-height: calc(100vh - 6.5rem);
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .login-access {
        align-items: start;
        padding: 1rem;
    }

    .login-card {
        height: auto;
        padding: 1.5rem;
    }

    .login-options {
        align-items: flex-start;
        flex-direction: column;
    }

    .login-form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .login-form-actions .login-submit,
    .login-back-action {
        width: 100%;
    }
}
