body.auth-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background: #f7f9fb;
    color: #1d1d1f;
    font-family: Arial, sans-serif;
}

.auth-page *,
.auth-page *::before,
.auth-page *::after {
    box-sizing: border-box;
}

.auth-page__main {
    display: grid;
    flex: 1 0 auto;
    place-items: start center;
    padding: 36px 20px 44px;
}

.auth-card {
    width: min(480px, 100%);
    overflow: hidden;
    border: 1px solid #e1e6ea;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.12);
}

.auth-card__header,
.auth-card__brand {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 68px;
    padding: 14px 64px 4px;
}

.auth-card__brand {
    min-height: 76px;
    padding: 16px 28px 0;
}

.auth-card__logo {
    display: block;
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.auth-card__header .auth-card__logo {
    position: absolute;
    top: 13px;
    left: 22px;
}

.auth-card__body {
    padding: 0 30px 20px;
}

.auth-page__tabs {
    display: flex;
    width: fit-content;
    padding: 3px;
    border-radius: 999px;
    background: #ededed;
    margin-top: 3px;
    margin-bottom: 5px;
}

.auth-page__tab {
    min-width: 88px;
    padding: 9px 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #1d1d1f;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.auth-page__tab.is-active {
    background: #003660;
    color: #ffffff;
}

.auth-page__tab:focus-visible,
.auth-page__oauth:focus-visible,
.auth-page__submit:focus-visible,
.auth-page__secondary:focus-visible,
.auth-page__field input:focus-visible {
    outline: 3px solid rgba(0, 122, 205, 0.35);
    outline-offset: 2px;
}

.auth-page__panel[hidden] {
    display: none;
}

.auth-page__title {
    margin: 0;
    color: #1d1d1f;
    font-size: 24px;
    line-height: 1.2;
    text-align: center;
}

.auth-page__messages {
    display: grid;
    gap: 8px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}

.auth-page__messages li,
.auth-page__field-error {
    margin: 0;
    padding: 9px 11px;
    border: 1px solid #e08a8a;
    border-radius: 8px;
    background: #fff4f4;
    color: #a40000;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.auth-page__messages li.success {
    border-color: #9bcfb0;
    background: #f1fbf4;
    color: #196b35;
}

.auth-page__oauth-stack {
    display: grid;
    gap: 10px;
}

.auth-page__oauth-stack--compact {
    gap: 8px;
}

.auth-page__oauth {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    gap: 10px;
    border: 1px solid #cccccc;
    border-radius: 999px;
    background: #ffffff;
    color: #5d5d5d;
    box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.22);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-page__oauth:hover {
    border-color: #aaaaaa;
    box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.24);
    text-decoration: none;
}

.auth-page__oauth:active {
    background: #eeeeee;
}

.auth-page__oauth-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.auth-page__oauth-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.auth-page__oauth-icon--facebook {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='12' cy='12' r='10' fill='%231877F2'/><path fill='white' d='M14.8 8.6h-1.3c-.3 0-.6.3-.6.7v1.3h1.9l-.2 2h-1.7v5.4h-2.2v-5.4H9.2v-2h1.6V9.3c0-1.5 1-2.6 2.5-2.6h1.6v1.9z'/></svg>");
}

.auth-page__divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 15px 0 13px;
    color: #666666;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

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

.auth-page__divider--compact {
    margin: 12px 0 9px;
}

.auth-page__form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-page__form--signup {
    gap: 8px;
}

.auth-page__field {
    display: grid;
    gap: 5px;
    color: #1d1d1f;
    font-size: 13px;
    font-weight: 800;
}

.auth-page__field input {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #dddddd;
    border-radius: 8px;
    background: #f4f4f4;
    color: #1d1d1f;
    font: inherit;
    font-size: 15px;
    font-weight: 400;
}

.auth-page__field input::placeholder {
    font-weight: 400;
}

.auth-page__form--signup .auth-page__field {
    gap: 4px;
    font-size: 12px;
}

.auth-page__form--signup .auth-page__field input {
    min-height: 37px;
    font-size: 14px;
}

.auth-page__field input:focus {
    border-color: #003660;
    background: #ffffff;
}

.auth-page__field-error {
    margin-top: -3px;
    padding: 7px 9px;
    font-size: 12px;
}

.auth-page__recaptcha {
    min-height: 70px;
    margin-top: 2px;
}

.auth-page__recaptcha > div {
    transform: scale(0.9);
    transform-origin: left top;
}

.auth-page__submit,
.auth-page__secondary {
    min-height: 46px;
    margin-top: 7px;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
}

.auth-page__submit {
    background: #007acd;
    color: #ffffff;
}

.auth-page__submit:hover {
    background: #005d9c;
}

.auth-page__secondary {
    border: 1px solid #b9c5ce;
    background: #ffffff;
    color: #27485e;
}

.auth-page__secondary:hover {
    background: #f2f6f8;
}

#login_form .auth-page__forgot {
    align-self: center;
    margin-top: 2px;
    color: #006edb;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

#login_form .auth-page__forgot:hover,
#login_form .auth-page__forgot:focus-visible {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .auth-page__main {
        padding: 18px 0 30px;
    }

    .auth-card {
        width: 100%;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }

    .auth-card__header {
        min-height: 66px;
        padding: 12px 54px 4px;
    }

    .auth-card__header .auth-card__logo {
        top: 13px;
        left: 16px;
        width: 38px;
        height: 38px;
    }

    .auth-card__body {
        padding: 0 18px 24px;
    }

    .auth-page__tab {
        min-width: 82px;
        padding: 9px 14px;
        font-size: 14px;
    }

    .auth-page__oauth,
    .auth-page__submit,
    .auth-page__secondary {
        font-size: 15px;
    }

    .auth-page__form--signup .auth-page__submit,
    .auth-page__oauth-stack--compact .auth-page__oauth {
        font-size: 14px;
    }

    .auth-page__recaptcha > div {
        transform: scale(0.85);
    }
}
