/* Authentication 2026: one split panel (brand + form). Loaded after style.css and overrides its auth block. */
.yf-auth-body {
    --auth-line: rgba(157, 223, 196, .16);
    --auth-field: rgba(3, 18, 15, .42);
    background:
        radial-gradient(60% 55% at 12% 8%, rgba(101, 217, 174, .14), transparent 70%),
        radial-gradient(45% 50% at 92% 88%, rgba(232, 200, 105, .09), transparent 70%),
        linear-gradient(rgba(145, 221, 192, .03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(145, 221, 192, .03) 1px, transparent 1px),
        var(--auth-bg);
    background-size: auto, auto, 44px 44px, 44px 44px, auto;
}

.yf-auth-shell {
    display: grid;
    grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
    align-items: stretch;
    gap: 0;
    width: min(1060px, calc(100% - 48px));
    margin: clamp(20px, 4vh, 44px) auto clamp(28px, 5vh, 56px);
    padding: 0;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid var(--auth-line);
    border-radius: 28px;
    background: rgba(10, 32, 27, .72);
    box-shadow: 0 40px 110px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .05);
    backdrop-filter: blur(20px);
}

/* Brand panel */
.yf-auth-intro {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: none;
    padding: clamp(32px, 4vw, 52px);
    overflow: hidden;
    background:
        radial-gradient(90% 70% at 0% 0%, rgba(101, 217, 174, .22), transparent 65%),
        linear-gradient(160deg, #0f3a30 0%, #0a2620 55%, #071a17 100%);
    border-right: 1px solid var(--auth-line);
}
.yf-auth-intro::after {
    position: absolute;
    right: -90px;
    bottom: -90px;
    width: 280px;
    height: 280px;
    border: 1px solid rgba(232, 200, 105, .22);
    border-radius: 50%;
    box-shadow: 0 0 0 38px rgba(232, 200, 105, .035), 0 0 0 78px rgba(232, 200, 105, .02);
    content: '';
    pointer-events: none;
}
.yf-auth-intro > * { position: relative; z-index: 1; }
.yf-auth-intro h1 { max-width: 440px; margin: 18px 0 16px; font-size: clamp(32px, 3.6vw, 46px); line-height: 1.04; font-weight: 760; letter-spacing: -.02em; }
.yf-auth-intro p { font-size: 15px; line-height: 1.65; }
.yf-auth-intro ul { gap: 10px; margin-top: 28px; }
.yf-auth-intro li { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: #e3ece8; }
.yf-auth-intro li i { display: grid; flex: 0 0 auto; place-items: center; width: 32px; height: 32px; margin: 0; border: 1px solid var(--auth-line); border-radius: 10px; color: var(--auth-mint); background: rgba(145, 221, 192, .08); font-size: 16px; }

/* Form panel */
.yf-auth-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: auto;
    padding: clamp(28px, 3.6vw, 44px) clamp(24px, 4vw, 52px);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}
.yf-auth-card__head h2, .yf-auth-state h2 { margin: 8px 0 8px; font-size: clamp(25px, 2.6vw, 32px); letter-spacing: -.015em; }
.yf-auth-card__head p { margin: 0 0 20px; font-size: 13.5px; line-height: 1.55; }

.yf-auth-form { gap: 14px; }
.yf-auth-form__columns { gap: 12px; align-items: start; }
.yf-auth-input { grid-template-columns: 20px minmax(0, 1fr); min-height: 46px; border-color: var(--auth-line); background: var(--auth-field); }
.yf-auth-input:has(.yf-auth-eye) { grid-template-columns: 20px minmax(0, 1fr) 30px; }
.yf-auth-input:hover { border-color: rgba(145, 221, 192, .3); }
.yf-auth-input:focus-within { border-color: rgba(145, 221, 192, .8); box-shadow: 0 0 0 3px rgba(145, 221, 192, .13); }
.yf-auth-input.is-invalid { border-color: rgba(255, 119, 125, .76); }
.yf-auth-eye { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; color: #7d918a; background: transparent; font-size: 17px; cursor: pointer; transition: color 150ms, background 150ms; }
.yf-auth-eye:hover, .yf-auth-eye[aria-pressed="true"] { color: var(--auth-mint); background: rgba(145, 221, 192, .08); }
.yf-auth-eye:focus-visible { outline: 2px solid rgba(145, 221, 192, .6); outline-offset: 1px; }

/* Password rules: one compact line of chips */
.yf-password-requirements { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -4px; }
.yf-password-requirements span { gap: 5px; padding: 4px 9px; border: 1px solid var(--auth-line); border-radius: 999px; background: rgba(255, 255, 255, .02); transition: color 150ms, border-color 150ms, background 150ms; }
.yf-password-requirements span.is-valid { border-color: rgba(145, 221, 192, .4); background: rgba(145, 221, 192, .08); }

/* Consents: compact block */
.yf-auth-consents { gap: 8px; padding: 12px 14px; border: 1px solid var(--auth-line); border-radius: 12px; background: rgba(255, 255, 255, .02); }
.yf-auth-consent { font-size: 11.5px !important; line-height: 1.45; }
.yf-auth-policy-link { font-size: 10.5px; }
.yf-required-legend { display: none; }
.yf-auth-form-status:empty { display: none; }
.yf-auth-form-status { color: var(--auth-muted); font-size: 12px; }

.yf-auth-button { min-height: 50px; border-radius: 12px; background: linear-gradient(135deg, #e8c869 0%, #91ddc0 100%); box-shadow: 0 14px 34px rgba(72, 180, 143, .22); }
.yf-auth-button:focus-visible { outline: 3px solid rgba(145, 221, 192, .45); outline-offset: 2px; }
.yf-auth-form__line { font-size: 12.5px; }

/* Providers: equal buttons in one row (three, or four with Apple) */
.yf-auth-divider { margin: 18px 0 14px; }
.yf-telegram-auth { margin-top: 0; gap: 10px; }
.yf-telegram-auth__providers { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; }
.yf-auth-provider { width: 100%; height: 46px; border-color: var(--auth-line); border-radius: 12px; background: rgba(255, 255, 255, .05); }
.yf-auth-provider--telegram { color: #5fc1f1; border-color: rgba(73, 172, 232, .35); background: rgba(73, 172, 232, .1); }
.yf-auth-provider--yandex { border-color: #fc3f1d; background: #fc3f1d; }
.yf-auth-provider--vk { border-color: #07f; background: #07f; }
/* Apple's guidelines: white button with a black logo on dark backgrounds. */
.yf-auth-provider--apple { border-color: #fff; color: #000; background: #fff; }
.yf-auth-provider--apple:hover:not(:disabled) { background: #f2f2f2; }

.yf-auth-switch { margin-top: 18px; }
.yf-auth-switch a { font-weight: 700; }
.yf-auth-alert { margin-bottom: 14px; }

@media (max-width: 920px) {
    .yf-auth-shell { grid-template-columns: 1fr; width: min(560px, calc(100% - 32px)); margin-top: 16px; border-radius: 22px; }
    .yf-auth-intro { padding: 22px 22px 20px; border-right: 0; border-bottom: 1px solid var(--auth-line); }
    .yf-auth-intro::after { display: none; }
    .yf-auth-intro h1 { margin: 12px 0 0; font-size: 26px; }
    .yf-auth-intro p, .yf-auth-intro ul { display: none; }
}

@media (max-width: 560px) {
    .yf-auth-shell { width: calc(100% - 24px); margin-bottom: 20px; }
    .yf-auth-card { padding: 22px 18px 24px; }
    .yf-auth-intro { padding: 16px 18px; }
    .yf-auth-intro h1 { font-size: 21px; }
    .yf-auth-form__columns { grid-template-columns: 1fr; }
    .yf-auth-card__head h2 { font-size: 24px; }
    .yf-auth-card__head p { margin-bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .yf-auth-input, .yf-auth-eye, .yf-password-requirements span, .yf-auth-button { transition: none; }
}

.yf-auth-consent.is-invalid { outline: 0; color: #ffc0c2 !important; }
.yf-auth-consents .yf-auth-error { margin-top: -2px; padding-left: 25px; }

/* «Проверьте почту»: changing a mistyped address before it is confirmed */
.yf-auth-change-email { width: 100%; max-width: 420px; margin-top: 4px; text-align: left; }
.yf-auth-change-email > summary { display: block; margin: 6px auto 0; text-align: center; list-style: none; text-decoration: underline; text-underline-offset: 3px; }
.yf-auth-change-email > summary::-webkit-details-marker { display: none; }
.yf-auth-change-email[open] > summary { margin-bottom: 12px; }
