/* ONLINE PARK — вход (модалка и страница), регистрация, восстановление пароля.
   Размеры сняты с макета: поле 56, кнопка 53, модалка 452 с полем 16, карточка формы 544 с полем 32. */

/* ── Поле с иконкой и пунктирным делителем (Frame 69/70 макета) ── */

.afield { position: relative; }
.afield .input {
    height: 56px; padding: 0 16px 0 64px;
    border: 1px solid var(--blue); border-radius: var(--r-8);
    background: var(--white); color: var(--ink); font-size: 14px;
}
.afield .input:focus { border-color: var(--blue-h); }
.afield .input::placeholder { color: var(--ink); opacity: .3; }
.afield-ico {
    position: absolute; left: 17px; top: 20px; color: var(--blue); pointer-events: none;
}
.afield-line {
    position: absolute; left: 49px; top: 18px; height: 20px;
    border-left: 1px dashed var(--blue); pointer-events: none;
}
.afield-eye {
    position: absolute; right: 17px; top: 20px; width: 16px; height: 16px;
    padding: 0; border: 0; background: none; color: var(--ink); opacity: .5; cursor: pointer;
}
.afield-eye:hover { opacity: 1; color: var(--blue); }
.afield-eye .icon { display: block; }
.afield-eye .icon[hidden] { display: none; }
.afield.has-eye .input { padding-right: 48px; }

/* Ошибка: красная рамка, красная иконка, текст остаётся чёрным. */
.field:has(.field-error:not(:empty)) .afield .input,
.afield.is-invalid .input { border-color: var(--red); }
.field:has(.field-error:not(:empty)) .afield-ico,
.afield.is-invalid .afield-ico { color: var(--red); }
.field:has(.field-error:not(:empty)) .afield-line,
.afield.is-invalid .afield-line { border-color: var(--red); }
.auth-form .field { gap: 6px; }
.auth-form .field-error { font-size: 12px; padding-left: 17px; }

/* ── Кнопка формы (Frame 9: 53px, 16/500) ── */

.btn-auth { height: 53px; font-size: 16px; font-weight: 500; border-radius: var(--r-8); gap: 8px; }
.btn-auth .icon { color: currentColor; }
.btn-auth-ghost { background: var(--bg); color: var(--ink); }
.btn-auth-ghost:hover { background: var(--bg-grey); color: var(--ink); }
.btn-auth-done { background: var(--green); color: var(--ink); pointer-events: none; }

.auth-form { display: flex; flex-direction: column; gap: 8px; }
.auth-form .field { display: flex; flex-direction: column; }

/* ── Чекбокс макета (Frame 259: 20×20, галка) ── */

.acheck { position: relative; display: inline-flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: 14px; line-height: 19px; }
.acheck input { position: absolute; left: 0; top: 0; z-index: 1; width: 20px; height: 20px; margin: 0; opacity: 0; cursor: pointer; }
.acheck-box {
    flex: none; width: 20px; height: 20px; border-radius: var(--r-4);
    border: 1px solid var(--ink-30); background: var(--white);
    display: inline-flex; align-items: center; justify-content: center;
    transition: background .15s, border-color .15s;
}
.acheck-box svg { width: 10px; height: 8px; opacity: 0; transition: opacity .15s; }
.acheck input:checked + .acheck-box { background: var(--blue); border-color: var(--blue); }
.acheck input:checked + .acheck-box svg { opacity: 1; }
.acheck input:focus-visible + .acheck-box { outline: 2px solid var(--blue-h); outline-offset: 2px; }
.acheck-lg { font-size: 15px; line-height: 20px; }
.acheck-lg .acheck-box { margin-top: 0; }
.acheck a { text-decoration: underline; }
.acheck a:hover { color: var(--blue); }

.auth-types { display: flex; flex-wrap: wrap; gap: 24px; margin: 0 0 8px; }

/* ── Ссылка-кнопка «Забыли пароль?» ── */

.auth-link {
    display: inline-block; padding: 8px; font-size: 15px; line-height: 20px;
    color: var(--ink); text-decoration: underline; text-underline-offset: 3px;
}
.auth-link:hover { color: var(--blue); }

/* ── Модалки авторизации (login / уведомления) ── */

.modal-auth { background: rgba(6, 6, 6, .2); }
.modal-auth .modal-box {
    max-width: 452px; padding: 16px; border-radius: var(--r-8);
    box-shadow: 0 8px 32px rgba(6, 6, 6, .12);
}
.modal-auth .modal-head { align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.modal-auth .modal-title { font-size: 24px; line-height: 32px; font-weight: 700; }
.modal-auth .modal-close {
    flex: none; width: 24px; height: 24px; margin-top: 4px; padding: 0;
    border: 0; border-radius: 0; background: none; color: var(--red); cursor: pointer;
}
.modal-auth .modal-close:hover { color: #c93a3a; }
.modal-auth .modal-close .icon { display: block; }
.modal-auth .modal-foot { text-align: center; margin-top: 16px; }

/* ── Страницы: регистрация, забыли пароль, новый пароль ── */

.auth-page { padding-top: 40px; padding-bottom: 56px; }
.auth-page .crumbs { font-size: 13px; line-height: 17px; opacity: 1; margin-bottom: 40px; gap: 4px; }
.auth-page .crumbs a { opacity: .5; }
.auth-page .crumbs a:hover { opacity: 1; }
.auth-page .crumbs span { opacity: .5; }
.auth-page .crumbs b { font-weight: 400; }

.auth-card { width: 544px; max-width: 100%; background: var(--white); border-radius: var(--r-8); padding: 32px; }
.auth-card h1 { font-size: 32px; line-height: 43px; font-weight: 700; margin: 0 0 8px; }
.auth-card .auth-lead { font-size: 16px; line-height: 21px; opacity: .4; margin: 0 0 16px; }
.auth-card .auth-note { font-size: 14px; line-height: 19px; opacity: .4; margin: 16px 0 0; }
.auth-card .auth-form > .field > .acheck { margin-top: 8px; }
.auth-card .auth-form-links { margin-top: 16px; display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.auth-card .auth-form-links a { text-decoration: underline; text-underline-offset: 3px; }

/* Страница /login — та же форма, что в модалке, но в карточке */
.auth-card .auth-form + .modal-foot { text-align: center; margin-top: 16px; }

@media (max-width: 767px) {
    .auth-page { padding-top: 24px; padding-bottom: 40px; }
    .auth-page .crumbs { margin-bottom: 24px; }
    .auth-card { padding: 16px; }
    .auth-card h1 { font-size: 24px; line-height: 32px; }
    .auth-types { gap: 16px; }
}
