/* Leftover pages still on layouts.app */
.overwrite-container {
    width: 100% !important;
    margin-left: auto !important;
    overflow: hidden;
    max-height: unset;
}

/* Full-viewport split: form left, hatch illustration right */
.auth-fluid {
    background: #f6f7fb;
    background-image: none;
}

.auth-fluid .auth-fluid-form-box {
    display: flex;
    align-items: center;
    max-width: 480px;
    padding: 3rem 2.5rem;
    background-color: #ffffff;
}

.auth-form-inner {
    width: 100%;
}

.auth-fluid .auth-brand {
    position: static;
    margin-bottom: 2rem;
}

.auth-brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: #313a46;
}

.auth-fluid .auth-fluid-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4.5rem 3rem;
    overflow: visible;
    color: inherit;
    background-color: #eef2f7;
    background-image: none;
}

.auth-fluid-art {
    width: 100%;
    max-width: 616px;
    padding: 1.75rem 0;
    overflow: visible;
}

.auth-fluid-art img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    overflow: visible;
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #313a46;
    margin-bottom: 0.35rem;
}

.auth-subtitle {
    color: #8391a2;
    margin-bottom: 1.5rem;
}

.auth-fluid .form-label {
    font-weight: 600;
    color: #313a46;
}

.auth-fluid .form-control {
    height: 42px;
    min-height: 42px;
}

.auth-password-field {
    position: relative;
}

.auth-password-field .form-control {
    padding-right: 2.5rem;
}

.auth-password-field input[type="password"]::-ms-reveal,
.auth-password-field input[type="password"]::-ms-clear {
    display: none;
}

.auth-password-toggle {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6c757d;
    line-height: 1;
}

.auth-password-toggle.password-eye:before {
    font-size: 15px;
    line-height: 1;
}

.auth-password-toggle.password-eye.show-password:before {
    content: "\f06d1";
}

.auth-password-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.auth-password-row .form-label {
    margin-bottom: 0;
}

.auth-forgot-link,
.auth-footer-link {
    font-size: 13px;
}

.auth-login-invert .auth-password-toggle {
    color: #6c757d;
}

.auth-submit {
    min-height: 42px;
    width: 100%;
}

.auth-footer {
    margin-top: 1.25rem;
    color: #8391a2;
    font-size: 13px;
}

.mfa-digit-inputs {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin: 0.75rem 0 1rem;
}

.mfa-digit-inputs input {
    flex: 1 1 0;
    min-width: 0;
    max-width: 48px;
    width: 100%;
    height: 52px;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 600;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: #fff;
    color: #313a46;
}

.mfa-digit-inputs input::placeholder {
    color: #adb5bd;
}

.mfa-digit-inputs input:focus {
    border-color: #727cf5;
    outline: none;
    box-shadow: 0 0 0 2px rgba(114, 124, 245, 0.2);
}

html.dark-mode .auth-fluid {
    background: var(--fs-canvas);
}

html.dark-mode .auth-fluid .auth-fluid-form-box {
    background-color: var(--fs-surface);
}

html.dark-mode .auth-fluid .auth-fluid-right {
    background-color: var(--fs-rail);
}

html.dark-mode .auth-title,
html.dark-mode .auth-brand-text,
html.dark-mode .auth-fluid .form-label {
    color: var(--fs-text-strong);
}

html.dark-mode .auth-subtitle,
html.dark-mode .auth-footer {
    color: var(--fs-text-muted);
}

html.dark-mode .auth-fluid .input-group-text[data-password] {
    background: #161b22;
    border-color: var(--fs-border);
    color: var(--fs-text);
}

html.dark-mode .mfa-digit-inputs input {
    background: #161b22;
    border-color: var(--fs-border);
    color: var(--fs-text-strong);
}

html.dark-mode .mfa-digit-inputs input:focus {
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

@media (max-width: 991.98px) {
    .auth-fluid {
        min-height: 100vh;
        min-height: 100dvh;
    }

    .auth-fluid .auth-fluid-form-box {
        max-width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        padding: 2rem 1.5rem;
        padding-top: max(2rem, env(safe-area-inset-top, 0px));
        padding-bottom: max(2rem, env(safe-area-inset-bottom, 0px));
        align-items: flex-start;
        align-content: flex-start;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        scroll-padding-bottom: 1.5rem;
    }

    .auth-fluid .auth-fluid-right {
        display: none;
    }

    .auth-centered .auth-fluid {
        display: block;
        min-height: 100vh;
        min-height: 100dvh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .auth-centered .auth-fluid .auth-fluid-form-box {
        min-height: auto;
        max-height: none;
        margin: 0;
        padding-top: max(2.5rem, env(safe-area-inset-top, 0px));
        padding-bottom: max(2.5rem, env(safe-area-inset-bottom, 0px));
        border-radius: 0;
        border: none;
    }
}

/* Centered auth: no illustration, form in the middle */
.auth-centered .auth-fluid {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f6f7fb;
    background-image: none;
}

.auth-centered .auth-fluid .auth-fluid-right {
    display: none;
}

.auth-centered .auth-fluid .auth-fluid-form-box {
    max-width: 420px;
    width: 100%;
    min-height: auto;
    margin: 1.5rem;
    padding: 2.5rem 2rem;
    background-color: #ffffff;
    border: 1px solid #eef2f7;
    border-radius: 8px;
}

html.dark-mode .auth-centered .auth-fluid {
    background: var(--fs-canvas);
}

html.dark-mode .auth-centered .auth-fluid .auth-fluid-form-box {
    background-color: var(--fs-surface);
    border-color: var(--fs-border);
}

/* Login only: blue form panel, white illustration panel */
.auth-login-invert .auth-fluid {
    background: #ffffff;
}

.auth-login-invert .auth-fluid .auth-fluid-form-box {
    background-color: #3a4278;
    background-image: linear-gradient(165deg, #2c3358 0%, #3d4780 52%, #4a5494 100%);
}

.auth-login-invert .auth-fluid .auth-fluid-right {
    background-color: #ffffff;
}

.auth-login-invert .auth-brand .logo-dark {
    display: none;
}

.auth-login-invert .auth-brand .logo-light {
    display: block;
}

.auth-login-invert .auth-brand-text,
.auth-login-invert .auth-title,
.auth-login-invert .auth-fluid .form-label {
    color: #ffffff;
}

.auth-login-invert .auth-subtitle {
    color: rgba(255, 255, 255, 0.72);
}

.auth-login-invert .auth-forgot-link,
.auth-login-invert .auth-forgot-link:hover,
.auth-login-invert .auth-forgot-link:focus {
    color: #ffffff;
    text-decoration: underline;
}

.auth-login-invert .auth-fluid .form-control {
    background-color: #ffffff;
    border-color: transparent;
    color: #313a46;
}

.auth-login-invert .auth-fluid .form-control:focus {
    background-color: #ffffff;
    border-color: transparent;
    color: #313a46;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45);
}

.auth-login-invert .auth-fluid .form-control::placeholder {
    color: #98a6ad;
}

.auth-login-invert .auth-fluid .input-group-text[data-password] {
    background: #ffffff;
    border-color: transparent;
    color: #6c757d;
}

.auth-login-invert .auth-submit.btn-primary {
    background-color: #ffffff;
    border-color: #ffffff;
    color: #2c3358;
}

.auth-login-invert .auth-submit.btn-primary:hover,
.auth-login-invert .auth-submit.btn-primary:focus {
    background-color: #f3f4f8;
    border-color: #f3f4f8;
    color: #2c3358;
}

.auth-login-invert .invalid-feedback {
    color: #ffd4d8;
}

html.dark-mode .auth-login-invert .auth-fluid {
    background: var(--fs-canvas);
}

html.dark-mode .auth-login-invert .auth-fluid .auth-fluid-form-box {
    background-color: #3a4278;
    background-image: linear-gradient(165deg, #2c3358 0%, #3d4780 52%, #4a5494 100%);
}

html.dark-mode .auth-login-invert .auth-fluid .auth-fluid-right {
    background-color: var(--fs-rail);
}

html.dark-mode .auth-login-invert .auth-title,
html.dark-mode .auth-login-invert .auth-brand-text,
html.dark-mode .auth-login-invert .auth-fluid .form-label {
    color: #ffffff;
}

html.dark-mode .auth-login-invert .auth-subtitle {
    color: rgba(255, 255, 255, 0.72);
}

html.dark-mode .auth-login-invert .auth-fluid .form-control,
html.dark-mode .auth-login-invert .auth-fluid .form-control:focus {
    background-color: #ffffff;
    border-color: transparent;
    color: #313a46;
}

html.dark-mode .auth-login-invert .auth-fluid .input-group-text[data-password] {
    background: #ffffff;
    border-color: transparent;
    color: #6c757d;
}
