/* Login and registration use the same calm palette as the main landing. */
body:has(.auth-modern) {
    background: #edf3f6;
    font-family: var(--site-ui-font, "Montserrat", Arial, sans-serif);
}

body:has(.auth-modern) .main-app-header {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: min(calc(100% - 40px), 1180px);
    height: 72px;
    border: 1px solid #e0e9ed;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(31, 82, 111, .07);
}

body:has(.auth-modern) .main-app-login-link {
    color: #142f3e;
    font-size: 15px;
    font-weight: 700;
}

.auth-page-nav {
    position: fixed;
    z-index: 100;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 76px;
    border-bottom: 1px solid rgba(11, 16, 21, .08);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(16px);
}

.auth-page-nav__brand img {
    display: block;
    width: auto;
    height: 48px;
    max-width: 120px;
    object-fit: contain;
}

.auth-modern.container-wrapper {
    min-height: 100vh;
    padding: 120px 20px 55px;
    background: radial-gradient(circle at 80% 16%, #dceef6 0, transparent 37%), #edf3f6;
    overflow: visible;
}

.auth-modern .login-container {
    display: block;
    width: min(100%, 510px);
    max-width: 510px;
    margin: auto;
    padding: 38px clamp(22px, 4vw, 46px) 30px;
    border: 1px solid #e3edf2;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(31, 82, 111, .09);
}

.auth-modern--register .login-container {
    width: min(100%, 560px);
    max-width: 560px;
}

.auth-modern .login-left,
.auth-modern .login-left__inner {
    display: block;
    width: 100%;
    max-width: none;
    scale: 1;
}

.auth-modern .login-left__header {
    display: block;
    margin: 0 0 30px;
}

.auth-modern .login-left__header h1 {
    margin: 0 0 9px;
    color: #142f3e;
    font-size: clamp(1.75rem, 2.5vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -.045em;
}

.auth-modern .login-left__header p {
    margin: 0;
    color: #617989;
    font-size: .9rem;
    line-height: 1.55;
}

.auth-modern .login-form-group:not(.captcha) {
    margin: 0 0 18px;
}

.auth-modern .login-form-label,
.auth-modern .form-check-span {
    color: #243c4b;
    font-size: .86rem;
    font-weight: 600;
    text-shadow: none;
}

.auth-modern .login-form-label {
    display: block;
    margin-bottom: 7px;
}

.auth-modern .login-input {
    min-height: 46px;
    padding: 10px 14px 10px 43px;
    border: 1px solid #cbdfe9;
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    color: #142f3e;
    font-size: .9rem;
}

.auth-modern .login-input:hover,
.auth-modern .login-input:focus {
    border-color: #72aac8;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(47, 117, 159, .12);
}

.auth-modern .login-input__icon {
    left: 12px;
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #5a8298 !important;
    font-size: .9rem;
}

.auth-modern .login-form__options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.auth-modern .login-form__options .form-check-group {
    margin: 0;
}

.auth-modern .login-form__options .lostpassword {
    margin-left: auto;
    white-space: nowrap;
}

.auth-modern .login-form__footer {
    margin-top: 16px;
}

.auth-modern--login .login-form__footer .login-btn {
    width: 100%;
}

.auth-modern .login-btn {
    min-width: 174px;
    min-height: 46px;
    padding: 10px 22px;
    border: 1px solid #2f759f;
    border-radius: 8px;
    background: #2f759f;
    color: #fff;
    box-shadow: 0 6px 15px rgba(47, 117, 159, .14);
    font-size: .93rem;
    font-weight: 700;
}

.auth-modern .login-btn:hover {
    background: #1f526f;
    border-color: #1f526f;
    scale: 1;
}

.auth-modern .lostpassword,
.auth-modern__switch a {
    background: none;
    color: #2f759f;
    -webkit-text-fill-color: currentColor;
    font-size: .87rem;
    font-weight: 700;
    text-decoration: none;
}

.auth-modern .form-check-span a {
    color: #2f759f !important;
    -webkit-text-fill-color: #2f759f;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: #a9cbdc;
    text-underline-offset: 2px;
}

.auth-modern .form-check-span a:hover {
    color: #1f526f !important;
    -webkit-text-fill-color: #1f526f;
}

.auth-modern .lostpassword:hover,
.auth-modern__switch a:hover {
    color: #1f526f;
    text-decoration: underline;
    text-shadow: none;
}

.auth-modern__switch {
    margin: 28px 0 0;
    padding-top: 20px;
    border-top: 1px solid #e5eef2;
    color: #617989;
    font-size: .88rem;
    text-align: center;
}

.auth-modern:not(.auth-modern--register) .auth-modern__switch a {
    font-size: 1rem;
}

.auth-modern--forgot .login-form__footer .login-btn {
    width: 100%;
}

.auth-modern--reset .login-form__footer .login-btn {
    width: 100%;
}

.auth-verify__next {
    padding: 20px;
    border: 1px solid #dceaf1;
    border-radius: 12px;
    background: #f5fafc;
}

.auth-verify__next p {
    margin: 0 0 16px;
    color: #344f5e;
    font-size: .9rem;
    line-height: 1.6;
}

.auth-verify__resend {
    width: 100%;
    background: #fff !important;
    color: #2f759f !important;
    box-shadow: none !important;
}

.auth-verify__resend:hover,
.auth-verify__resend:focus-visible {
    background: #e8f3f9 !important;
    color: #1f526f !important;
}

.auth-verify__logout-form {
    display: inline;
}

.auth-verify__logout {
    padding: 0;
    border: 0;
    background: none;
    color: #2f759f;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.auth-verify__logout:hover,
.auth-verify__logout:focus-visible {
    color: #1f526f;
    text-decoration: underline;
}

.auth-modern .login-form-message {
    border-radius: 8px;
    box-shadow: none;
}

.auth-modern .login-oauth { margin-top: 24px; }

.auth-modern .login-vkid {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.auth-modern .login-oauth__divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    color: #8aa0ad;
    font-size: .8rem;
    text-align: center;
}

.auth-modern .login-oauth__divider::before,
.auth-modern .login-oauth__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5eef2;
}

.auth-modern .login-oauth__button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 46px;
    padding: 9px 16px;
    border: 1px solid #d7e3e9;
    border-radius: 8px;
    background: #fff;
    color: #142f3e;
    font-size: .9rem;
    font-weight: 700;
    text-decoration: none;
    transition: border-color .15s, box-shadow .15s;
}

.auth-modern .login-oauth__button:hover,
.auth-modern .login-oauth__button:focus-visible {
    border-color: #a3c4d5;
    box-shadow: 0 0 0 3px rgba(47, 117, 159, .1);
    color: #142f3e;
    text-decoration: none;
}

.auth-modern .login-oauth__button:disabled {
    cursor: wait;
    opacity: .6;
}

.auth-modern .login-oauth__logo {
    display: block;
    flex: 0 0 25px;
    width: 25px;
    height: 25px;
    object-fit: contain;
}

.auth-modern .login-oauth__error {
    margin: 12px 0 0;
    padding: 11px 13px;
    border: 1px solid #e9a2a8;
    border-radius: 9px;
    background: #fff3f3;
    color: #9f1d2a;
    font-size: .9rem;
    font-weight: 800;
    line-height: 1.45;
}

.auth-modern .login-oauth__hint { margin: 16px 0 0; color: #607987; font-size: .78rem; line-height: 1.5; }

@media (max-width: 575px) {
    .auth-modern.container-wrapper { padding: 108px 15px 30px; }
    .auth-modern .login-container { padding: 28px 22px; }
    .auth-modern .login-form__footer { flex-wrap: wrap; }
    .auth-modern .login-form__footer .login-btn { flex: 1 1 100%; }
}

@media (min-width: 2400px) {
    body:has(.auth-modern) .main-app-header {
        width: min(calc(100% - 80px), 1680px);
    }
}
