/* qr_login.css — вход по QR-коду (страница входа на компьютере и страница /qr на телефоне) */

/* ---------- компьютер: кнопка под формой входа ---------- */
.qrl-or { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.qrl-or > span { display: flex; align-items: center; gap: 12px; color: var(--muted, #71717a); font: 500 .75rem var(--mono, monospace); letter-spacing: .14em; text-transform: uppercase; }
.qrl-or > span::before, .qrl-or > span::after { content: ''; flex: 1; height: 1px; background: var(--line, rgba(255,255,255,.08)); }
.qrl-open { display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left; width: 100%; padding: 12px 14px;
    border-radius: 14px; border: 1px solid var(--line2, rgba(255,255,255,.16)); background: rgba(255,255,255,.03); color: var(--text, #f4f4f5); font: inherit; cursor: pointer;
    transition: background .25s, border-color .25s, transform .4s var(--ease, ease); }
.qrl-open:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.26); transform: translateY(-1px); }
.qrl-open:active { transform: scale(.985); }
.qrl-open svg { grid-row: 1 / 3; width: 38px; height: 38px; padding: 8px; border-radius: 11px; background: rgba(0,113,227,.14); color: #4ea1ff; }
.qrl-open b { font-size: .92rem; font-weight: 600; letter-spacing: -.01em; }
.qrl-open small { color: var(--text2, #a1a1aa); font-size: .78rem; }
@media (max-width: 700px) { .qrl-or { display: none; } }

/* ---------- компьютер: окно с QR-кодом (поверх формы, внутри той же карточки) ---------- */
/* 2026-11-12: содержимое окна QR — по центру карточки по вертикали. Раньше оно прижималось к верху карточки, высота которой
   задана формой входа (с кнопками QR и Telegram она выше окна), и на экране 900px код стоял у самого верха.
   Так же по центру стоит вход по QR у WhatsApp Web, Telegram Web, Discord и Steam. */
.auth .qrl-pane { display: flex; flex-direction: column; justify-content: center; }
.auth .qrl-pane { position: absolute; inset: 0; opacity: 0; visibility: hidden; pointer-events: none; transform: translateX(28px);
    transition: opacity .3s ease, transform .6s var(--ease, ease), visibility 0s linear .6s; }
.auth.qrl-on .qrl-pane { opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition: opacity .4s ease .05s, transform .6s var(--ease, ease), visibility 0s; }
.auth.qrl-on > .tabs, .auth.qrl-on > .viewport { opacity: 0; visibility: hidden; transform: translateX(-28px); transition: opacity .3s ease, transform .6s var(--ease, ease), visibility 0s linear .6s; }
.auth > .tabs, .auth > .viewport { transition: opacity .4s ease, transform .6s var(--ease, ease), visibility 0s; }
.qrl-pane h2 { margin: 0 0 18px; }
.qrl-box { position: relative; width: 236px; aspect-ratio: 1; margin: 0 0 12px; border-radius: 22px; background: #fff; padding: 14px;
    box-shadow: 0 0 0 1px rgba(255,255,255,.08); }   /* 2026-11-12: без синего свечения под кодом — у WhatsApp/Telegram/Discord код на простой белой карточке */
.qrl-code { width: 100%; height: 100%; transition: filter .45s var(--ease, ease), opacity .45s; }
.qrl-code svg { display: block; width: 100%; height: 100%; }
.qrl-box:not([data-s="code"]) .qrl-code { filter: blur(6px); opacity: .35; }
.qrl-ov { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 18px; text-align: center; border-radius: 22px;
    color: #111; opacity: 0; visibility: hidden; transform: scale(.96); transition: opacity .35s, transform .5s var(--ease, ease), visibility 0s linear .5s; }
.qrl-box[data-s="load"] .qrl-ov-load, .qrl-box[data-s="scan"] .qrl-ov-scan, .qrl-box[data-s="exp"] .qrl-ov-exp { opacity: 1; visibility: visible; transform: none; transition: opacity .35s, transform .5s var(--ease, ease), visibility 0s; }
.qrl-ov-scan { background: rgba(255,255,255,.82); backdrop-filter: blur(2px); }
.qrl-ov-scan img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px #fff, 0 0 0 5px #32d74b; margin-bottom: 6px; animation: qrlPop .6s var(--ease, ease); }
.qrl-ov-scan b { font-size: 1rem; letter-spacing: -.01em; }
.qrl-ov-scan small { color: #555; font-size: .8rem; line-height: 1.35; }
.qrl-ov-exp { background: rgba(255,255,255,.86); }
.qrl-ov-exp b { font-size: .95rem; }
.qrl-renew { margin-top: 6px; height: 38px; padding: 0 18px; border: 0; border-radius: 11px; background: #0071e3; color: #fff; font: 600 .85rem var(--sans, sans-serif); cursor: pointer; }
.qrl-renew:hover { background: #0a7df0; }
.qrl-spin, .qrm-spin { width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid rgba(0,0,0,.12); border-top-color: #0071e3; animation: qrlSpin .8s linear infinite; }
.qrl-steps { margin: 0 0 6px; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 9px; }
.qrl-steps li { counter-increment: s; display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: center; color: var(--text2, #a1a1aa); font-size: .86rem; line-height: 1.45; }
.qrl-steps li::before { content: counter(s); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 600 .75rem var(--mono, monospace); color: var(--text, #fff); background: rgba(255,255,255,.07); border: 1px solid var(--line2, rgba(255,255,255,.16)); }
.qrl-steps b { color: var(--text, #fff); font-weight: 600; }
.qrl-pane .code-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.qrl-left { color: var(--muted, #71717a); font: 400 .75rem var(--mono, monospace); }
@keyframes qrlSpin { to { transform: rotate(360deg); } }
@keyframes qrlPop { from { transform: scale(.6); opacity: 0; } }
/* сколько осталось жить коду.
   2026-11-12: обычная плоская полоса — как определённый (determinate) линейный индикатор Material 3 и UIProgressView у Apple:
   ровная заливка одним цветом на нейтральной дорожке, 4px, без свечения, градиента и смены цвета (раньше под ней светилась тень
   QR-карточки, а заливка плавно перетекала из синего в оранжевый). Сколько осталось — пишет строка «код обновится через …» внизу. */
.qrl-bar { width: 236px; height: 4px; margin: 0 0 20px; border-radius: 2px; background: rgba(255,255,255,.1); overflow: hidden; }
.qrl-bar i { display: block; height: 100%; background: var(--text, #f4f4f5); transform-origin: left center; transition: transform .25s linear; }
.qrl-pane:has(.qrl-box:not([data-s="code"])) .qrl-bar i { opacity: .25; }
@media (prefers-reduced-motion: reduce) { .qrl-pane, .qrl-ov, .qrl-bar i { transition: none !important; } }

/* ---------- телефон: страница /qr ---------- */
body.qrm { margin: 0; min-height: 100vh; min-height: 100dvh; background: #09090b; color: #f4f4f5;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
.qrm-wrap { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); box-sizing: border-box; }
.qrm-card { width: 100%; max-width: 400px; box-sizing: border-box; padding: 28px 22px 22px; border-radius: 26px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.1);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 40px 80px -40px rgba(0,0,0,.8); text-align: center; }
.qrm-logo { width: 54px; height: 54px; margin: 0 auto 18px; border-radius: 16px; display: grid; place-items: center; background: rgba(0,113,227,.16); color: #4ea1ff; }
.qrm-logo svg { width: 28px; height: 28px; }
.qrm-s { display: none; animation: qrmIn .5s cubic-bezier(.16,1,.3,1); }
.qrm-card[data-state="loading"] [data-s="loading"], .qrm-card[data-state="login"] [data-s="login"], .qrm-card[data-state="confirm"] [data-s="confirm"],
.qrm-card[data-state="done"] [data-s="done"], .qrm-card[data-state="rejected"] [data-s="rejected"], .qrm-card[data-state="bad"] [data-s="bad"] { display: block; }
.qrm-s[data-s="loading"] .qrm-spin { margin: 10px auto 14px; border-color: rgba(255,255,255,.12); border-top-color: #4ea1ff; }
.qrm h1 { margin: 0 0 10px; font-size: 1.45rem; font-weight: 700; letter-spacing: -.025em; }
.qrm-muted { margin: 0 0 20px; color: #a1a1aa; font-size: .93rem; line-height: 1.5; }
.qrm-me { display: inline-flex; align-items: center; gap: 9px; margin: 0 auto 16px; padding: 5px 12px 5px 5px; border-radius: 99px; background: rgba(255,255,255,.06); font-size: .82rem; color: #d4d4d8; }
.qrm-me img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.qrm-dev { display: flex; align-items: center; gap: 12px; margin: 6px 0 14px; padding: 14px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); text-align: left; }
.qrm-dev-ic { flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.07); }
.qrm-dev-ic svg { width: 22px; height: 22px; }
.qrm-dev b { display: block; font-size: 1rem; letter-spacing: -.01em; }
.qrm-dev small { display: block; margin-top: 3px; color: #a1a1aa; font: 400 .75rem 'JetBrains Mono', ui-monospace, Menlo, monospace; }
.qrm-warn { display: flex; gap: 10px; margin: 0 0 18px; padding: 12px 13px; border-radius: 14px; background: rgba(255,159,10,.09); border: 1px solid rgba(255,159,10,.22); color: #f5c88b; font-size: .8rem; line-height: 1.45; text-align: left; }
.qrm-warn svg { flex-shrink: 0; width: 18px; height: 18px; margin-top: 1px; }
.qrm-warn b { color: #ffd9a3; }
.qrm-btn { display: flex; align-items: center; justify-content: center; width: 100%; height: 54px; margin-top: 10px; border: 0; border-radius: 15px; background: #0071e3; color: #fff;
    font-family: inherit; font-size: 1rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .2s, background .2s, opacity .2s; box-sizing: border-box; }
.qrm-btn:active { transform: scale(.98); }
.qrm-btn.ghost { background: rgba(255,255,255,.07); color: #e4e4e7; }
.qrm-btn:disabled { opacity: .55; }
.qrm-btn.busy span::after { content: '…'; }
.qrm-timer { margin: 16px 0 0; font-size: .8rem; }
.qrm-ok { width: 70px; height: 70px; margin: 4px auto 16px; border-radius: 50%; display: grid; place-items: center; color: #32d74b; border: 1px solid rgba(50,215,75,.45); animation: qrlPop .6s cubic-bezier(.16,1,.3,1); }
.qrm-ok svg { width: 32px; height: 32px; }
.qrm-foot { margin: 18px 0 0; color: #52525b; font: 400 .75rem 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; }
@keyframes qrmIn { from { opacity: 0; transform: translateY(8px); } }
/* телефон и планшет: скрытая панель QR сдвинута на 20px (поле страницы 24px) — не выходит за край экрана */
@media (max-width: 900px) { .auth .qrl-pane { transform: translateX(20px); } .auth.qrl-on .qrl-pane { transform: none; } }
