body.auth-page {
    overflow-x: hidden;
}

body.auth-page #toast-container {
    top: 0.85rem;
    right: 0.85rem;
    padding: 0;
}

.auth-layout {
    display: grid;
    grid-template-columns: 1fr;
    min-height: calc(100vh - var(--legal-bar-height));
    height: calc(100vh - var(--legal-bar-height));
    background: #fff;
}

.auth-layout__form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    min-height: calc(100vh - var(--legal-bar-height));
    height: 100%;
    padding: 2.5rem 1.5rem;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    --auth-field-gap: 1rem;
    box-sizing: border-box;
}

.auth-layout__header {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-logo {
    display: block;
    max-width: 155px;
    height: auto;
    margin: 0 auto 1rem;
}

.auth-heading {
    color: var(--fsmm-primary);
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0;
}

.auth-heading--page {
    font-size: 1.35rem;
    margin-top: 0.25rem;
}

.auth-heading--register {
    font-size: 1.35rem;
}

.auth-subheading {
    color: var(--fsmm-primary);
    font-size: 1.05rem;
    font-weight: 500;
    margin-top: 0.35rem;
    margin-bottom: 0;
}

.auth-google-wrap {
    position: relative;
    margin-bottom: 0;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid #dadce0;
    border-radius: 999px;
    background: #fff;
    color: #3c4043;
    font-weight: 500;
    cursor: not-allowed;
    opacity: 0.85;
}

.btn-google svg {
    flex-shrink: 0;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #6c757d;
    font-size: 0.9rem;
    margin: 1rem 0 var(--auth-field-gap);
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #dee2e6;
}

.auth-field,
.auth-gdpr {
    margin-bottom: var(--auth-field-gap);
}

.auth-field {
    overflow: visible;
}

.auth-field label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: #212529;
}

.auth-field .form-control {
    border-radius: 999px;
    padding: 0.7rem 1.1rem;
    border-color: #ced4da;
}

.auth-field .form-control:focus {
    border-color: var(--fsmm-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--fsmm-primary-rgb), 0.15);
}

.auth-submit {
    width: 100%;
    border-radius: 999px;
    padding: 0.75rem 1rem;
    font-weight: 600;
    margin-top: 0;
}

.auth-gdpr {
    margin-top: 0;
}

.auth-gdpr .form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0;
}

.auth-gdpr .form-check-input {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.auth-gdpr .form-check-label {
    font-size: 0.72rem;
    line-height: 1.45;
    color: #495057;
}

.auth-gdpr__link {
    color: var(--fsmm-primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-gdpr__link:hover {
    color: #1d6196;
}

.auth-gdpr .form-check-input:checked {
    background-color: var(--fsmm-primary);
    border-color: var(--fsmm-primary);
}

.auth-gdpr .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(var(--fsmm-primary-rgb), 0.15);
}

.auth-footer {
    margin-top: 1.5rem;
    font-size: 0.95rem;
    color: #495057;
    text-align: center;
}

.auth-footer a {
    color: var(--fsmm-primary);
    font-weight: 600;
    text-decoration: none;
}

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

.auth-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    background: #212529;
    color: #fff;
    font-size: 0.8125rem;
    padding: 0.4rem 0.75rem;
    border-radius: 0.375rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 10;
}

.auth-tooltip.is-visible {
    opacity: 1;
}

.auth-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #212529;
}

.auth-layout__hero {
    --shape-size: 182px;
    --shape-gap-x: 2.25rem;
    --shape-gap-y: 1.85rem;
    display: none;
    align-items: center;
    justify-content: center;
    height: calc(100vh - var(--legal-bar-height));
    max-height: calc(100vh - var(--legal-bar-height));
    overflow: hidden;
    background: #fff;
}

.auth-hero__columns {
    display: flex;
    gap: var(--shape-gap-x);
    align-items: flex-start;
    justify-content: center;
}

.auth-hero__column {
    display: flex;
    flex-direction: column;
    gap: var(--shape-gap-y);
    flex: 0 0 var(--shape-size);
    width: var(--shape-size);
}

.auth-hero__column--offset {
    padding-top: calc(var(--shape-size) * 0.55);
}

.auth-hero__column--offset-sm {
    padding-top: calc(var(--shape-size) * 0.2);
}

.auth-hero__shape {
    flex: 0 0 auto;
    width: var(--shape-size);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.auth-hero__shape--circle {
    height: var(--shape-size);
    border-radius: 50%;
}

.auth-hero__shape--pill {
    height: calc(var(--shape-size) * 2.35);
    border-radius: 999px;
}

@media (min-width: 992px) {
    .auth-layout {
        grid-template-columns: 1fr 1fr;
    }

    .auth-layout__form {
        justify-self: center;
        align-self: stretch;
        padding: 2rem 2.5rem;
    }

    .auth-layout__hero {
        display: flex;
    }

    body.auth-page--register,
    body.auth-page--register .auth-layout--register {
        height: calc(100vh - var(--legal-bar-height));
        max-height: calc(100vh - var(--legal-bar-height));
        overflow: hidden;
    }

    body.auth-page--register .auth-footer {
        margin-top: 1.25rem;
    }
}

@media (min-width: 1200px) {
    .auth-layout__hero {
        --shape-size: 200px;
        --shape-gap-x: 2.5rem;
        --shape-gap-y: 2rem;
    }
}

.auth-password-rules {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 0.65rem;
    margin: 0.5rem 0 1.35rem;
}

.auth-password-rules__item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 500;
    color: #adb5bd;
    transition: color 0.15s ease;
}

.auth-password-rules__icon {
    flex-shrink: 0;
    font-size: 0.78rem;
    color: #ced4da;
    transition: color 0.15s ease;
}

.auth-password-rules__item.is-valid {
    color: #198754;
}

.auth-password-rules__item.is-valid .auth-password-rules__icon {
    color: #198754;
}

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

.auth-password-field__input {
    padding-right: 8.5rem;
}

.auth-password-field__tools {
    position: absolute;
    top: 50%;
    right: 0.35rem;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 0.1rem;
    overflow: visible;
    z-index: 2;
}

.auth-password-tool-wrap {
    position: relative;
    overflow: visible;
}

.auth-password-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #6c757d;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.auth-password-tool-btn:hover,
.auth-password-tool-btn:focus-visible {
    color: var(--fsmm-primary);
    background: rgba(var(--fsmm-primary-rgb), 0.08);
}

.auth-password-tool-wrap .auth-tooltip {
    left: 50%;
    right: auto;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    white-space: nowrap;
    z-index: 20;
}

.auth-password-tool-wrap .auth-tooltip::after {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}
