/* Общий вход платформы поверх staff-app/auth.css: фото-шапка, переходящая в тёмную форму. Шаг сетки — 8px. */
.p-auth { --p-ink: #0e121b; --p-blue: #174ea6; --p-text: #fff; --p-muted: rgba(255,255,255,.68); --p-soft: rgba(255,255,255,.5); }

/* Шапка: фото на всю ширину, снизу растворяется в цвет формы. */
.p-hero { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; min-height: 54svh; padding: max(20px, env(safe-area-inset-top)) 24px 32px; color: var(--p-text); background-color: #1b2332; background-image: linear-gradient(160deg, #22406f 0%, var(--p-ink) 100%); background-size: cover; background-position: center; }
.p-hero--photo { background-image: var(--p-hero-image); }
.p-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(14,18,27,.55) 0%, rgba(14,18,27,.1) 28%, rgba(14,18,27,.35) 62%, var(--p-ink) 100%); }
.p-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; letter-spacing: -.01em; color: #fff; text-decoration: none; }
.p-brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--p-blue); font-size: 17px; font-weight: 800; }
.p-brand-logo { display: block; width: auto; height: 40px; filter: drop-shadow(0 1px 6px rgba(14,18,27,.45)); }
@media (max-width: 640px) { .p-brand-logo { height: 32px; } }
.p-hero h2 { margin: 0 0 12px; font-size: clamp(40px, 11.5vw, 64px); line-height: .98; font-weight: 800; letter-spacing: -.035em; }
.p-hero p { max-width: 30ch; margin: 0; font-size: 16px; line-height: 1.45; color: rgba(255,255,255,.82); }

/* Форма. */
.p-auth .y-auth-layout .fi-simple-main-ctn { padding: 8px 24px max(40px, env(safe-area-inset-bottom)); }
.p-auth .y-auth-panel { max-width: 400px; }
.p-auth .y-auth-panel h1 { margin: 0 0 8px; font-size: 26px; line-height: 1.2; letter-spacing: -.02em; }
.p-auth .y-auth-panel h2 { margin: 32px 0 4px; font-size: 18px; }
.p-auth .y-auth-panel .lead { margin: 0 0 24px; font-size: 16px; line-height: 1.5; color: var(--p-muted); }
.p-auth .y-auth-panel label { margin: 0 0 8px; color: var(--p-muted); }
.p-auth .y-auth-panel input + label, .p-auth .y-auth-panel .error + label { margin-top: 20px; }
.p-auth .y-auth-panel input:not([type=hidden]) { min-height: 56px; border-radius: 16px; }
.p-auth .y-auth-panel #phone { font-size: 20px; letter-spacing: .02em; }
.p-auth .y-auth-panel button { min-height: 56px; margin-top: 16px; border-radius: 999px; }
.p-auth .y-auth-panel form + form button { margin-top: 12px; }
.p-auth .y-auth-panel .legal { margin: 16px 0 0; font-size: 13px; line-height: 1.45; color: var(--p-soft); }
.p-auth .y-auth-panel .footer { margin-top: 32px; }
.p-auth .y-auth-panel .notice { margin: 0 0 24px; }
.p-status { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 20px; border-radius: 18px; background: rgba(255,255,255,.1); }
.p-status svg { width: 28px; height: 28px; }
.p-status--ok { background: #fff; color: var(--p-blue); }
.p-auth .y-auth-panel .p-sent { margin: 0 0 8px; color: #b8f0c8; }

/* Шаги «код» и «заявка» на телефоне: шапка ниже, форма сразу на экране. */
.p-auth--compact .p-hero { min-height: 30svh; }
.p-auth--compact .p-hero p { display: none; }
.p-auth--compact .p-hero h2 { margin: 0; font-size: 36px; }

@media (min-width: 900px) {
    .p-auth .y-auth-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 0; padding: 20px; }
    .p-hero { min-height: calc(100dvh - 40px); padding: 40px 48px 56px; border-radius: 28px; overflow: hidden; }
    .p-hero::after { background: linear-gradient(180deg, rgba(14,18,27,.5) 0%, rgba(14,18,27,.05) 30%, rgba(14,18,27,.25) 60%, rgba(14,18,27,.88) 100%); }
    .p-hero h2 { font-size: clamp(56px, 5.6vw, 84px); }
    .p-hero p { font-size: 18px; }
    .p-auth--compact .p-hero { min-height: calc(100dvh - 40px); }
    .p-auth--compact .p-hero p { display: block; }
    .p-auth--compact .p-hero h2 { margin: 0 0 12px; font-size: clamp(56px, 5.6vw, 84px); }
    .p-auth .y-auth-layout .fi-simple-main-ctn { align-items: center; padding: 48px 64px; }
}

.p-auth .y-auth-standalone .y-auth-panel button, .p-auth.y-auth-standalone .y-auth-panel button { min-height: 56px !important; }

/* Выбор функций в заявке: строки-переключатели, как в Настройках iOS. */
.p-auth .y-auth-panel .p-features { margin: 32px 0 0; padding: 0; border: 0; }
.p-auth .y-auth-panel .p-features legend { margin: 0 0 4px; padding: 0; font-size: 18px; font-weight: 700; color: var(--p-text); }
.p-auth .y-auth-panel .p-features .hint { margin: 0 0 12px; color: var(--p-muted); }
.p-auth .y-auth-panel .p-feature { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; margin: 0; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.12); color: var(--p-text); cursor: pointer; }
.p-auth .y-auth-panel .p-feature:last-of-type { border-bottom: 0; }
.p-feature__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.p-feature__text strong { font-size: 16px; font-weight: 600; line-height: 1.3; }
.p-feature__text small { font-size: 13px; line-height: 1.35; color: var(--p-soft); }
.p-auth .y-auth-panel input.p-switch { appearance: none; -webkit-appearance: none; flex: none; width: 51px; min-height: 31px; height: 31px; padding: 0; border: 0; border-radius: 999px; background: rgba(255,255,255,.22); position: relative; cursor: pointer; transition: background-color 200ms cubic-bezier(.2, .8, .2, 1); }
.p-auth .y-auth-panel input.p-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.25); transition: transform 200ms cubic-bezier(.2, .8, .2, 1); }
.p-auth .y-auth-panel input.p-switch:checked { background: #34c759; border-color: transparent; }
.p-auth .y-auth-panel input.p-switch:checked::after { transform: translateX(20px); }
.p-auth .y-auth-panel input.p-switch:focus-visible { outline: 2px solid #fff; outline-offset: 2px; box-shadow: none; }

/* Анкета заведения: выбор роли — сегменты, как вкладки «Телефон / Почта». */
.p-auth .y-auth-panel .p-segment { margin: 20px 0 0; padding: 0; border: 0; }
.p-auth .y-auth-panel .p-segment legend { margin: 0 0 8px; padding: 0; color: var(--p-muted); font-size: 14px; font-weight: 600; }
.p-segment__track { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--y-auth-field); }
.p-auth .y-auth-panel .p-segment input[type=radio] { position: absolute; width: 1px; min-height: 0; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.p-auth .y-auth-panel .p-segment label { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 48px; margin: 0; border-radius: 999px; color: var(--p-muted); font-size: 15px; cursor: pointer; transition: background-color 160ms ease, color 160ms ease; }
.p-auth .y-auth-panel .p-segment input:checked + label { background: #fff; color: var(--y-auth-dark, #0e121b); font-weight: 650; }
.p-auth .y-auth-panel .p-segment input:focus-visible + label { outline: 3px solid #fff; outline-offset: 2px; }
.p-auth .y-auth-panel .p-segment + label, .p-auth .y-auth-panel .p-segment + .error + label { margin-top: 20px; }
.p-auth .y-auth-panel .p-optional { color: var(--p-soft); }
.p-auth .y-auth-panel .p-field-hint { margin: 8px 0 0; color: var(--p-soft); font-size: 13px; }
