:root {
    --login-side-bg: #c7d8f0;
    --login-primary: #1d6ee8;
    --login-primary-dark: #145dca;
    --login-card-bg: #f6f7f9;
    --login-text: #2f3d4c;
    --login-muted: #73889f;
}

.login-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 58% 42%;
    background: var(--login-side-bg);
}

.login-visual {
    position: relative;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.login-visual-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5, 22, 46, 0.66), rgba(8, 30, 58, 0.75));
}

.login-visual-content {
    position: absolute;
    left: clamp(1.2rem, 3vw, 3.2rem);
    bottom: clamp(1.6rem, 4vw, 3.2rem);
    max-width: 540px;
    color: #f6fbff;
    z-index: 1;
}

.visual-kicker {
    margin: 0 0 0.6rem;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    font-weight: 700;
    opacity: 0.9;
}

.login-visual-content h1 {
    margin: 0;
    font-size: clamp(1.7rem, 3.4vw, 2.9rem);
    font-weight: 500;
    line-height: 1.2;
}

.login-visual-content p {
    margin: 1rem 0 0;
    font-size: 1rem;
    opacity: 0.95;
}

.login-panel-side {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.2rem;
}

.login-card {
    width: min(92%, 450px);
    border-radius: 0.95rem;
    background: var(--login-card-bg);
    box-shadow: 0 22px 45px rgba(24, 46, 78, 0.2);
    padding: 1.5rem 1.4rem 1rem;
}

.login-header {
    margin-bottom: 1rem;
}

.login-title {
    margin: 0;
    color: var(--login-text);
    font-size: 2rem;
    font-weight: 700;
}

.login-subtitle {
    margin: 0.2rem 0 0;
    color: var(--login-muted);
    font-size: 1.03rem;
}

.login-alert {
    border-radius: 0.7rem;
    margin-bottom: 0.9rem;
}

.login-label {
    color: var(--login-text);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.36rem;
}

.login-input-group .input-group-text {
    border-radius: 0.4rem 0 0 0.4rem;
    border: 1px solid #ced8e6;
    border-right: 0;
    background: #e8eef7;
    color: #5a7494;
    font-size: 0.95rem;
}

.login-input {
    min-height: 42px;
    border-radius: 0 0.4rem 0.4rem 0;
    border: 1px solid #ced8e6;
    background: #edf2f8;
    font-size: 0.95rem;
}

.login-input:focus {
    border-color: #9ebbe4;
    box-shadow: 0 0 0 0.12rem rgba(35, 111, 212, 0.15);
    background: #f7fbff;
}

.login-submit {
    min-height: 44px;
    border: 0;
    border-radius: 0.35rem;
    background: linear-gradient(180deg, var(--login-primary), var(--login-primary-dark));
    font-size: 1.02rem;
    font-weight: 700;
}

.login-submit:disabled {
    cursor: wait;
    opacity: 0.9;
}

.login-footer {
    margin-top: 0.9rem;
    color: #8fa0b3;
    text-align: center;
    font-size: 0.78rem;
}

#authLoadingOverlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(12, 29, 55, 0.46);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

#authLoadingOverlay.active {
    opacity: 1;
    visibility: visible;
}

.auth-loading-box {
    width: min(88vw, 335px);
    border-radius: 0.8rem;
    background: #f4f7fb;
    box-shadow: 0 20px 48px rgba(8, 29, 53, 0.35);
    text-align: center;
    padding: 1rem 0.9rem 0.85rem;
}

.auth-loading-title {
    margin: 0;
    color: #334d6b;
    font-size: 1.1rem;
    font-weight: 700;
}

.auth-loading-subtitle {
    margin: 0.25rem 0 0.7rem;
    color: #6f84a0;
    font-size: 0.92rem;
}

.auth-loading-dots {
    display: inline-flex;
    gap: 0.32rem;
    align-items: center;
    justify-content: center;
}

.auth-loading-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #5d8fc6;
    animation: dotPulse 0.9s infinite ease-in-out;
}

.auth-loading-dots span:nth-child(2) {
    animation-delay: 0.12s;
}

.auth-loading-dots span:nth-child(3) {
    animation-delay: 0.24s;
}

@keyframes dotPulse {
    0%,
    80%,
    100% {
        transform: translateY(0);
        opacity: 0.45;
    }

    40% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

@media (max-width: 992px) {
    .login-layout {
        grid-template-columns: 1fr;
    }

    .login-visual {
        min-height: 44vh;
    }

    .login-panel-side {
        padding: 1rem;
    }

    .login-card {
        width: min(94vw, 460px);
        margin-top: -2.4rem;
    }
}
