/* ============================================================================
   auth-gate.css — окно «Вход / Регистрация / Напомнить пароль» поверх страницы (FEATURE_AUTH_GATE, FEATURE_AUTH_MODAL).
   Поведение — js/auth-gate.js. Файл общий для desktop и mobile (правится в desktop и копируется).
   ========================================================================== */
.ag-modal { --ag-ink: #0b1220; --ag-text: #1d2433; --ag-sub: #5b6472; --ag-line: #e4e8ef; --ag-card: #fff; --ag-soft: #f4f6fa; --ag-ac: #1e4fe0;
    position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 16px; font-family: 'Manrope', system-ui, sans-serif; }
html[data-theme="dark"] .ag-modal { --ag-ink: #eef1f6; --ag-text: #dfe4ec; --ag-sub: #9aa4b2; --ag-line: #2a303c; --ag-card: #151922; --ag-soft: #1b202a; --ag-ac: #6f9bff; }
.ag-modal[hidden] { display: none; }
.ag-modal *, .ag-modal *::before, .ag-modal *::after { box-sizing: border-box; }
.ag-bg { position: absolute; inset: 0; background: rgba(8, 12, 30, .62); backdrop-filter: blur(4px); animation: agFade .2s ease; }
.ag-box { position: relative; width: min(420px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 30px 28px 24px; border-radius: 24px; background: var(--ag-card); color: var(--ag-text); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .6); animation: agPop .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes agFade { from { opacity: 0; } } @keyframes agPop { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.ag-x { position: absolute; right: 14px; top: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--ag-soft); color: var(--ag-sub); cursor: pointer; }
.ag-x:hover { color: var(--ag-ink); }
.ag-ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 21px; color: #fff; background: linear-gradient(135deg, #4f8bff, #8b5cf6 55%, #ff4ed8); box-shadow: 0 14px 30px -14px rgba(139, 92, 246, .8); margin-bottom: 14px; }
.ag-ico.is-ok { background: linear-gradient(135deg, #16a34a, #4ade80); }
.ag-tabs { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--ag-soft); margin-bottom: 14px; }
.ag-tabs button { border: 0; background: transparent; padding: 7px 16px; border-radius: 9px; color: var(--ag-sub); font-size: 13.5px; font-weight: 700; cursor: pointer; }
.ag-tabs button.is-on { background: var(--ag-card); color: var(--ag-ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .14); }
.ag-box h3 { margin: 0 34px 6px 0; font-family: 'Unbounded', 'Manrope', sans-serif; font-size: 21px; line-height: 1.25; letter-spacing: -.02em; color: var(--ag-ink); }
.ag-lead { margin: 0 0 16px; font-size: 14px; line-height: 1.5; color: var(--ag-sub); }
.ag-banner { display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; margin-bottom: 12px; font-size: 13.5px; line-height: 1.4; }
.ag-banner[hidden] { display: none; }
.ag-banner.is-err { background: rgba(239, 68, 68, .12); color: #b91c1c; } html[data-theme="dark"] .ag-banner.is-err { color: #fca5a5; }
.ag-banner.is-ok { background: rgba(22, 163, 74, .12); color: #15803d; } html[data-theme="dark"] .ag-banner.is-ok { color: #86efac; }
.ag-banner i { margin-top: 2px; }
.ag-f { margin-bottom: 12px; }
.ag-f label { display: block; margin-bottom: 5px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ag-sub); }
.ag-ctl { position: relative; }
.ag-ctl input { width: 100%; height: 46px; padding: 0 14px; border-radius: 13px; border: 1px solid var(--ag-line); background: var(--ag-card); color: var(--ag-ink); font: inherit; font-size: 15px; font-weight: 600; outline: none; transition: border-color .15s, box-shadow .15s; }
.ag-ctl input:focus { border-color: var(--ag-ac); box-shadow: 0 0 0 3px rgba(30, 79, 224, .16); }
.ag-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; background: none; color: var(--ag-sub); cursor: pointer; }
.ag-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 14px; font-size: 13.5px; }
.ag-row a, .ag-sw a { color: var(--ag-ac); font-weight: 700; text-decoration: none; } .ag-row a:hover, .ag-sw a:hover { text-decoration: underline; }
.ag-chk { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--ag-text); font-weight: 600; }
.ag-chk input { width: 17px; height: 17px; accent-color: var(--ag-ac); }
.ag-submit { display: flex; align-items: center; justify-content: center; width: 100%; height: 50px; border: 0; border-radius: 14px; background: linear-gradient(135deg, #ff5470, #ff2f52); color: #fff; font: inherit; font-size: 15.5px; font-weight: 800; cursor: pointer; box-shadow: 0 16px 34px -16px rgba(255, 47, 82, .75); transition: transform .2s, filter .2s; }
.ag-submit:hover { filter: brightness(1.05); transform: scale(1.01); }
.ag-submit:disabled { opacity: .65; cursor: wait; transform: none; }
.ag-sw { margin: 14px 0 0; text-align: center; font-size: 13.5px; color: var(--ag-sub); }
.ag-newpass { margin: 0 0 16px; padding: 14px; border-radius: 14px; background: var(--ag-soft); text-align: center; font-family: ui-monospace, Consolas, monospace; font-size: 24px; font-weight: 800; letter-spacing: .08em; color: var(--ag-ink); user-select: all; }
body.ag-lock { overflow: hidden; }
@media (max-width: 560px) { .ag-modal { align-items: flex-end; padding: 0; } .ag-box { border-radius: 24px 24px 0 0; max-height: 94vh; padding: 24px 18px 20px; } }
@media (prefers-reduced-motion: reduce) { .ag-bg, .ag-box { animation: none; } }
