html, body {
    height: 100%;
    margin: 0;
}

body.auth-body {
    -webkit-font-smoothing: antialiased;
}

/* ---- Background (photo + overlays are unchanged from the previous login page) ---- */
.login-background-img {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    z-index: 0;
}

.auth-bg-scrim {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to right,
        rgba(76, 29, 149, 0.60) 0%,
        rgba(76, 29, 149, 0.78) 35%,
        rgba(76, 29, 149, 0.78) 65%,
        rgba(76, 29, 149, 0.60) 100%);
}

.auth-bg-bottom {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 20%;
    z-index: 1;
    background: linear-gradient(to bottom, transparent, rgba(46, 16, 101, 0.95));
}

/* ---- Layout ---- */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    width: 100%;
    padding: 24px 16px;
    box-sizing: border-box;
}

.auth-stage {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 404px;
}

/* ---- Card: .slrm-modal chrome, sized and unclipped for an in-page card ---- */
.slrm-modal.auth-card {
    position: relative;
    width: 100%;
    max-width: 404px;
    max-height: none;
    overflow: visible;
    box-sizing: border-box;
    padding: 34px 36px 30px;
    margin: 0;
}

.auth-logo {
    display: block;
    align-self: center;
    max-width: 100%;
    margin-bottom: 26px;
}

.auth-subtitle {
    text-align: center;
    font-weight: 600;
    margin: -12px 0 24px;
}

.auth-title {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.auth-body-text {
    text-align: center;
    font-size: 12.5px;
    color: var(--slrm-text-2);
    line-height: 1.55;
    margin-top: 7px;
    text-wrap: pretty;
    overflow-wrap: anywhere;
}

.auth-body-text b {
    color: var(--slrm-text-1);
    font-weight: 500;
}

.auth-fields-spaced {
    margin-top: 16px;
}

.auth-card .slrm-af {
    min-width: 0;
}

.auth-card .slrm-input {
    min-width: 0;
    height: auto;
    margin: 0;
    box-sizing: border-box;
}

.auth-hint {
    font-size: 12px;
    color: var(--slrm-text-muted);
    margin-top: 4px;
}

.slrm-af.slrm-has-error .auth-hint {
    display: none;
}

/* ---- Checkbox group spacing ---- */
.auth-checks {
    margin-top: 12px;
}

.auth-checks .slrm-af-check {
    padding: 5px 0;
}

/* ---- Form banner: the popup strip becomes a bordered box inside the card ---- */
.auth-card .slrm-form-error {
    margin-top: 20px;
    padding: 11px 12px;
    border: 1px solid #fecaca;
    border-radius: 6px;
}

/* ---- Primary button: full-width card variant + disabled state ---- */
.auth-card .slrm-btn-primary {
    display: block;
    width: 100%;
    height: auto;
    margin: 20px 0 0;
    padding: 11px 16px;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: .1px;
    line-height: 1.3;
}

.auth-card .slrm-btn-primary:disabled {
    background: #efeaf8;
    color: #a693c9;
    cursor: not-allowed;
}

.auth-card .slrm-btn-primary.auth-btn-spaced {
    margin-top: 26px;
}

/* ---- Links ---- */
.auth-card a:not(.list-group-item) {
    color: var(--primary-purple);
    text-decoration: none;
}

.auth-card a:not(.list-group-item):hover {
    text-decoration: underline;
}

.auth-card a:hover {
    color: var(--slrm-purple-hover);
}

.auth-forgot {
    text-align: center;
    margin-top: 16px;
}

.auth-backlink {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.auth-backlink a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    font-weight: 500;
}

.auth-soft {
    margin-top: 24px;
    padding: 11px 12px;
    background: var(--slrm-surface-2);
    border: 1px solid var(--slrm-border-light);
    border-radius: 6px;
    font-size: 12px;
    color: var(--slrm-text-2);
    line-height: 1.5;
}

.auth-soft a {
    font-weight: 500;
}

.auth-soft a.is-disabled {
    color: var(--slrm-text-muted);
    pointer-events: none;
    text-decoration: none;
}

/* ---- Language select ---- */
.auth-langrow {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.auth-card select.auth-lang {
    width: auto;
    height: auto;
    padding: 2px 0;
    border: none;
    border-radius: 0;
    background: transparent;
    font-size: 12.5px;
    color: var(--slrm-text-2);
    text-align: center;
    text-align-last: center;
    cursor: pointer;
}

/* ---- Footer links on the photo ---- */
.auth-foot {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 22px;
    margin-top: 16px;
    font-size: 12.5px;
}

.auth-foot a {
    color: rgba(255, 255, 255, .82);
    text-decoration: none;
    cursor: pointer;
}

.auth-foot a:hover {
    color: #fff;
    text-decoration: underline;
}

.slrm-modal.auth-card .slrm-fields-grid {
    grid-template-columns: 1fr;
}

@media (max-width: 480px) {
    .slrm-modal.auth-card {
        padding: 28px 22px 24px;
    }
}
