/* Authentication screens from proseller-auth3-2.pdf. */
.auth-page {
    --auth-ink: #102544;
    --auth-muted: #7c8aa3;
    --auth-blue: #2d65bd;
    --auth-border: #d8e1f0;
    --auth-surface: #edf2f9;
    min-height: 100%;
    height: auto;
    margin: 0;
    background: #e9eef6;
    color: var(--auth-ink);
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.45;
}
.auth-page .page { min-height: 100vh; background: transparent; }
.auth-page .page__main { padding: 0; display: block; }
.auth-page .auth-layout { display: flex; justify-content: center; padding: 24px 16px; min-height: 100vh; }
.auth-card {
    width: 100%;
    max-width: 460px;
    align-self: flex-start;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: 32px;
    box-shadow: 0 14px 40px rgba(35, 58, 94, .08);
}
.auth-card--step { display: flex; flex-direction: column; min-height: min(920px, calc(100dvh - 48px)); }
.auth-header { position: relative; display: flex; align-items: center; min-height: 70px; padding: 16px 22px; border-bottom: 1px solid var(--auth-border); }
.auth-card--step .auth-header { min-height: 84px; }
.auth-brand { display: inline-flex; gap: 14px; align-items: center; color: var(--auth-ink); font-size: 24px; font-weight: 700; text-decoration: none; }
.auth-brand img { display: block; flex: none; width: 24px; height: 44px; object-fit: contain; }
.auth-header__title { width: 100%; margin: 0; padding: 0 44px; font-size: 21px; line-height: 1.2; font-weight: 700; text-align: center; }
.auth-icon-button { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 16px; color: var(--auth-ink); background: var(--auth-surface); text-decoration: none; }
.auth-icon-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.auth-header__back, .auth-header__close { position: absolute; top: 17px; }
.auth-header__back { left: 22px; }
.auth-header__close { right: 22px; }
.auth-content { padding: 26px 21px 18px; }
.auth-title { margin: 0; color: var(--auth-ink); font-size: 27px; line-height: 1.2; font-weight: 700; letter-spacing: 0; }
.auth-subtitle { margin: 10px 0 26px; color: var(--auth-muted); font-size: 16px; line-height: 1.5; }
.auth-subtitle strong { color: var(--auth-ink); font-weight: 700; overflow-wrap: anywhere; }
.auth-providers { display: grid; gap: 12px; }
.auth-provider { display: flex; align-items: center; gap: 16px; min-height: 76px; padding: 16px 18px; border: 1px solid var(--auth-border); border-radius: 19px; background: var(--auth-surface); color: var(--auth-ink); font-size: 18px; line-height: 1.25; font-weight: 700; text-decoration: none; transition: background .15s, border-color .15s; }
.auth-provider:hover { background: #e4ecf8; border-color: #adc3e3; }
.auth-provider__icon { display: flex; align-items: center; justify-content: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 13px; overflow: hidden; }
.auth-provider__icon--vk { background: #2787f5; }
.auth-provider__icon--vk img { width: 40px; height: 40px; }
.auth-provider__icon--google { background: white; border: 1px solid #e4e9f1; }
.auth-provider__icon--google img { width: 24px; height: 24px; }
.auth-provider--muted { color: #7b8799; background: #f5f7fb; border-color: #e5ebf5; }
.auth-provider--muted img { filter: grayscale(1); opacity: .45; }
.auth-notice { margin: 10px 0 0; padding: 12px 16px; border-radius: 16px; font-size: 15px; line-height: 1.5; background: var(--auth-surface); }
.auth-notice--error { background: #ffedf1; color: #ff3155; }
.auth-divider { display: flex; gap: 14px; align-items: center; margin: 22px 0 20px; color: var(--auth-muted); font-size: 16px; }
.auth-divider::before, .auth-divider::after { content: ''; height: 1px; flex: 1; background: var(--auth-border); }
.auth-form { margin: 0; }
.auth-field { padding: 11px 19px 12px; background: var(--auth-surface); border: 1px solid var(--auth-border); border-radius: 19px; transition: border-color .15s, box-shadow .15s; }
.auth-field label { display: block; margin: 0 0 2px; color: var(--auth-muted); font-size: 14px; line-height: 1.3; cursor: text; }
.auth-field input { display: block; width: 100%; height: 30px; margin: 0; padding: 0; border: 0; border-radius: 0; outline: 0; background: transparent; color: var(--auth-ink); font-family: inherit; font-size: 21px; line-height: 30px; font-weight: 700; box-shadow: none; }
.auth-field input::placeholder { color: #777; opacity: 1; }
.auth-field:focus-within { border-color: var(--auth-blue); box-shadow: 0 0 0 3px rgba(45, 101, 189, .1); }
.auth-field--error, .auth-field--error:focus-within { border-color: #ff3155; }
.auth-field--valid { border-color: #21a343; }
.auth-field--valid:focus-within { border-color: #21a343; box-shadow: 0 0 0 3px rgba(33, 163, 67, .1); }
.auth-field-error { margin: 8px 2px 0; color: #ff3155; font-size: 15px; line-height: 1.4; }
.auth-field-error:empty { display: none; }
.auth-button { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 64px; padding: 14px 18px; border: 0; border-bottom: 4px solid #23498c; border-radius: 19px; background: linear-gradient(105deg, #2b50a3, #44a9ed); color: #fff; font-family: inherit; font-size: 20px; line-height: 1.25; font-weight: 700; text-align: center; text-decoration: none; cursor: pointer; transition: filter .15s; }
.auth-button:hover { filter: brightness(1.06); }
.auth-button:active { transform: translateY(1px); }
.auth-button:disabled { border-color: transparent; background: #d9e1ef; color: #7a879d; cursor: default; filter: none; }
.auth-email-submit { margin-top: 38px; }
.auth-text-link { display: inline-block; border: 0; padding: 0; background: none; color: var(--auth-blue); font-family: inherit; font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer; }
.auth-text-link:hover { text-decoration: underline; }
.auth-password { margin-top: 16px; }
.auth-password summary { width: fit-content; margin: 0 auto; color: var(--auth-blue); font-size: 13px; cursor: pointer; }
.auth-password .auth-form { display: grid; gap: 14px; margin-top: 18px; }
.auth-password .auth-text-link { text-align: center; }
.auth-legal { margin: 16px 0 0; color: var(--auth-muted); font-size: 14px; line-height: 1.65; }
.auth-legal a { color: var(--auth-blue); font-weight: 700; text-decoration: none; }
.auth-legal a:hover { text-decoration: underline; }
.auth-content--code { padding-top: 38px; text-align: center; }
.auth-key { display: flex; align-items: center; justify-content: center; width: 92px; height: 96px; margin: 0 auto 20px; border-bottom: 4px solid #23498c; border-radius: 29px; background: linear-gradient(135deg, #2b50a3, #44a9ed); color: #fff; }
.auth-key svg { width: 46px; height: 46px; fill: none; stroke: currentColor; stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
.auth-content--code .auth-subtitle { margin-bottom: 32px; }
.auth-code { position: relative; height: 74px; }
.auth-code__cells { display: none; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; height: 100%; }
.auth-code__cell { display: flex; align-items: center; justify-content: center; height: 100%; border: 1px solid var(--auth-border); border-radius: 17px; background: var(--auth-surface); color: var(--auth-ink); font-size: 30px; line-height: 1; font-weight: 700; }
.auth-code__input { width: 100%; height: 100%; padding: 0; border: 1px solid var(--auth-border); border-radius: 17px; background: var(--auth-surface); color: var(--auth-ink); font-size: 30px; letter-spacing: 12px; text-align: center; }
.auth-code--enhanced .auth-code__cells { display: grid; }
.auth-code--enhanced .auth-code__input { position: absolute; inset: 0; border: 0; background: transparent; color: transparent; caret-color: transparent; opacity: .01; }
.auth-code:focus-within .auth-code__cell--active { border-color: var(--auth-blue); box-shadow: 0 0 0 2px rgba(45, 101, 189, .15); }
.auth-code--error .auth-code__cell { border-color: #ff3155; }
.auth-code__submit { margin-top: 18px; }
.auth-code--enhanced .auth-code__submit { display: none; }
.auth-resend { margin: 20px 0 0; color: var(--auth-muted); font-size: 16px; text-align: center; }
.auth-resend .auth-text-link { font-weight: 400; }
.auth-profile { display: flex; flex: 1; flex-direction: column; padding-top: 36px; padding-bottom: 20px; }
.auth-avatar { margin-bottom: 26px; text-align: center; }
.auth-avatar__preview { display: flex; align-items: center; justify-content: center; width: 136px; height: 136px; margin: 0 auto 12px; overflow: hidden; border: 2px solid var(--auth-border); border-radius: 50%; background: var(--auth-surface); }
.auth-avatar__preview svg { width: 72px; height: 72px; fill: #a9b8d1; }
.auth-avatar__preview img { width: 100%; height: 100%; object-fit: cover; }
.auth-avatar__label { font-size: 17px; }
.auth-avatar:focus-within .auth-avatar__preview { outline: 3px solid var(--auth-blue); outline-offset: 3px; }
.auth-profile .auth-field { padding-top: 12px; padding-bottom: 14px; }
.auth-nickname-error { min-height: 21px; margin-top: 9px; }
.auth-nickname-error:empty { display: block; }
.auth-hint { margin: 14px 0 28px; color: var(--auth-muted); font-size: 16px; }
.auth-profile__submit { margin-top: auto; }
.auth-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.auth-page [hidden], .auth-welcome[hidden] { display: none !important; }
.auth-page a:focus-visible, .auth-page button:focus-visible, .auth-page summary:focus-visible { outline: 3px solid #2d65bd; outline-offset: 3px; }
.auth-welcome { position: fixed; z-index: 10000; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(16, 37, 68, .45); color: #102544; font-family: Arial, sans-serif; }
.auth-welcome__card { position: relative; width: 100%; max-width: 420px; padding: 32px 20px 20px; border-radius: 28px; background: white; text-align: center; }
.auth-welcome__card .auth-icon-button { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border: 0; background: #edf2f9; color: #102544; cursor: pointer; }
.auth-welcome__wave { margin-bottom: 8px; font-size: 54px; line-height: 1.2; }
.auth-welcome__card h2 { margin: 0; font-size: 25px; line-height: 1.2; }
.auth-welcome__card p { margin: 10px 0 20px; color: #7c8aa3; font-size: 14px; }
.auth-welcome__card .auth-button { min-height: 54px; font-size: 17px; }
@media (max-width: 480px) {
    .auth-page .auth-layout { padding: 16px 12px; }
    .auth-card { border-radius: 27px; }
    .auth-card--step { min-height: calc(100dvh - 32px); }
    .auth-header { padding-left: 18px; padding-right: 18px; min-height: 62px; }
    .auth-brand { gap: 12px; font-size: 21px; }
    .auth-content { padding-left: 18px; padding-right: 18px; }
    .auth-title { font-size: 24px; }
    .auth-subtitle { font-size: 15px; }
    .auth-card--login .auth-content { padding-top: 22px; padding-bottom: 14px; }
    .auth-card--login .auth-subtitle { margin-bottom: 20px; }
    .auth-providers { gap: 10px; }
    .auth-provider { gap: 13px; padding: 12px; min-height: 60px; font-size: 16px; }
    .auth-provider__icon { flex-basis: 34px; width: 34px; height: 34px; border-radius: 11px; }
    .auth-provider__icon--vk img { width: 34px; height: 34px; }
    .auth-notice { font-size: 14px; }
    .auth-field { padding-left: 16px; padding-right: 16px; }
    .auth-field label { font-size: 12px; }
    .auth-field input { font-size: 19px; }
    .auth-button { min-height: 58px; font-size: 18px; }
    .auth-email-submit { margin-top: 24px; }
    .auth-card--login .auth-field { padding-top: 9px; padding-bottom: 10px; }
    .auth-card--login .auth-password { margin-top: 10px; }
    .auth-legal { font-size: 12px; }
    .auth-header__title { font-size: 20px; }
    .auth-header__back { left: 18px; }
    .auth-header__close { right: 18px; }
    .auth-content--code { padding-top: 36px; }
    .auth-code { height: 66px; }
    .auth-code__cells { gap: 7px; }
    .auth-code__cell { border-radius: 15px; font-size: 26px; }
    .auth-resend { font-size: 15px; }
    .auth-avatar__preview { width: 128px; height: 128px; }
    .auth-welcome { align-items: flex-end; padding: 0; }
    .auth-welcome__card { max-width: none; padding-bottom: max(20px, env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; }
}
@media (prefers-reduced-motion: reduce) {
    .auth-page * { transition: none !important; }
}

.auth-form--stacked { display: grid; gap: 14px; }
.auth-form--stacked .auth-field-error { margin-top: -8px; }
.auth-form--stacked > .auth-text-link { text-align: center; }
.auth-password-link { display: block; margin-top: 14px; text-align: center; font-size: 13px; font-weight: 400; }
