/* Страница входа SFX hub. Отдельный файл: тёмная тема живёт только здесь и
   не мешает светлому интерфейсу остальных разделов.
   Значения сняты с присланного макета (холст 1440×900). */

:root {
    --ink: #0A0C0F;          /* фон левой половины и текст на синем */
    --panel: #111418;        /* фон правой половины */
    --field: #161A20;        /* фон полей */
    --line: #2A3038;         /* рамка полей */
    --fg: #F2F4F0;           /* основной текст */
    --lab: #C9CFD6;          /* подписи полей */
    --mut: #9AA3AD;          /* приглушённый текст */
    --acc: #4D8DFF;          /* акцент */
    --acc-dark: #3C78E0;
}

* { box-sizing: border-box; }

.auth-body {
    margin: 0;
    font-family: Onest, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--ink);
    color: var(--fg);
    font-size: 16px;
}

.auth { display: flex; min-height: 100vh; }

/* ── Левая половина: сетка, кольца, логотип ── */
.auth-art {
    flex: 0 0 55.4%;
    position: relative;
    overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 54px;
    background-color: var(--ink);
    background-image:
        linear-gradient(rgba(255, 255, 255, .043) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .043) 1px, transparent 1px);
    background-size: 56px 56px;
}

/* Кольца уходят за правый верхний угол — отсюда отрицательные отступы. */
.ring { position: absolute; border-radius: 50%; }
.ring-1 { width: 520px; height: 520px; top: -180px; right: -180px; border: 1px solid rgba(255, 255, 255, .14); }
.ring-2 { width: 340px; height: 340px; top:  -90px; right:  -90px; border: 1px solid rgba(255, 255, 255, .09); }
.ring-dot { position: absolute; top: 257px; right: 257px; width: 14px; height: 14px;
            border-radius: 50%; background: var(--acc); }

.auth-logo { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.auth-mark {
    width: 40px; height: 40px; border-radius: 11px; background: var(--acc);
    display: inline-flex; align-items: center; justify-content: center;
}
.auth-logo b { font-family: Unbounded, Onest, sans-serif; font-weight: 700; font-size: 17px; }

.auth-lockup { position: relative; z-index: 1; }
.auth-word { display: flex; align-items: flex-end; gap: 14px; }
.auth-sfx {
    font-family: Unbounded, Onest, sans-serif; font-weight: 800;
    font-size: 184px; line-height: .86; letter-spacing: -.02em;
}
.auth-pill {
    font-family: Unbounded, Onest, sans-serif; font-weight: 700; font-size: 54px;
    line-height: 1; color: var(--ink); background: var(--acc); border-radius: 999px;
    padding: 10px 24px; transform: rotate(-6deg);
    /* Поворот выносит угол плашки ниже строки — приподнимаем, чтобы низ
       совпал с низом букв SFX, как в макете. */
    margin-bottom: 9px;
}
.auth-tag { margin: 26px 0 0; font-size: 18px; line-height: 1.5; color: var(--mut); }

/* ── Правая половина: форма ── */
.auth-side {
    flex: 1; background: var(--panel);
    display: flex; align-items: center; justify-content: center;
    padding: 40px 24px;
    /* Без min-width: 0 flex-элемент не сжимается уже своего содержимого:
       форма в 400px распирала бы страницу на узком экране. */
    min-width: 0;
}
.auth-form { width: 400px; max-width: 100%; }
.auth-form h1 { margin: 0; font-family: Unbounded, Onest, sans-serif; font-weight: 700; font-size: 30px; }
.auth-sub { margin: 8px 0 32px; font-size: 16px; line-height: 1.5; color: var(--mut); }

.field { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.field-top { display: flex; align-items: baseline; justify-content: space-between; }
.auth-form label { font-size: 14px; font-weight: 500; color: var(--lab); }

.auth-form input[type="text"],
.auth-form input[type="password"] {
    width: 100%; height: 52px; padding: 0 16px;
    background: var(--field); border: 1px solid var(--line); border-radius: 12px;
    color: var(--fg); font: 400 16px Onest, sans-serif;
}
.auth-form input::placeholder { color: #5C6672; }
.auth-form input:focus {
    outline: none; border-color: var(--acc);
    box-shadow: 0 0 0 3px rgba(77, 141, 255, .16);
}

/* Поле пароля с глазком: кнопка лежит поверх правого края. */
.pw { position: relative; }
.pw input { padding-right: 50px; }
.pw-eye {
    position: absolute; top: 50%; right: 12px; transform: translateY(-50%);
    display: flex; padding: 4px; border: 0; background: none; cursor: pointer;
    color: var(--mut);
}
.pw-eye:hover, .pw-eye.is-on { color: var(--acc); }

.auth-link {
    padding: 0; border: 0; background: none; cursor: pointer;
    font: 400 14px Onest, sans-serif; color: var(--acc);
}
.auth-link:hover { text-decoration: underline; }
.auth-hint { margin: 0; font-size: 13px; color: var(--mut); }

/* ── Чекбокс: свой квадрат вместо системного ── */
.auth-check {
    display: flex; align-items: center; gap: 10px; cursor: pointer;
    font-size: 15px; color: var(--lab); margin: 4px 0 22px;
}
/* Оформляем сам input, а не прячем его под подменный квадрат: спрятанный
   через opacity элемент выпадает из дерева доступности, и до галочки нельзя
   добраться ни с клавиатуры, ни скринридером. */
.auth-check input {
    appearance: none; -webkit-appearance: none;
    position: relative; flex: none; margin: 0; cursor: pointer;
    width: 18px; height: 18px; border-radius: 5px;
    border: 1px solid var(--line); background: var(--field);
}
.auth-check input:checked { background: var(--acc); border-color: var(--acc); }
.auth-check input:checked::after {
    content: ""; position: absolute; left: 5px; top: 1px;
    width: 5px; height: 10px; border: solid var(--ink);
    border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.auth-check input:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(77, 141, 255, .25); }

.auth-btn {
    width: 100%; height: 54px; border: 0; border-radius: 12px; cursor: pointer;
    background: var(--acc); color: var(--ink);
    font: 700 15px Unbounded, Onest, sans-serif;
}
.auth-btn:hover { background: var(--acc-dark); }

.auth-foot {
    margin: 28px 0 0; padding-top: 24px; border-top: 1px solid #1E232A;
    font-size: 15px; color: var(--mut);
}

.auth-flash {
    margin-bottom: 20px; padding: 12px 14px; border-radius: 12px; font-size: 14px;
    background: rgba(220, 70, 70, .12); border: 1px solid rgba(220, 70, 70, .35); color: #FF9A94;
}
.auth-flash-success { background: rgba(60, 180, 110, .12); border-color: rgba(60, 180, 110, .35); color: #7FE0AC; }

/* ── Промежуточная ширина: макет ещё в две колонки, но надпись не влезает ── */
@media (max-width: 1100px) {
    .auth-sfx { font-size: 128px; }
    .auth-pill { font-size: 38px; padding: 8px 20px; margin-bottom: 7px; }
}

/* ── Телефон: отдельный макет, холст 390×844 ──
   Колонки становятся друг под другом: сверху полоса оформления с логотипом и
   надписью, под ней форма. Значения сняты с мобильного макета. */
@media (max-width: 900px) {
    .auth { flex-direction: column; }

    .auth-art {
        flex: none; width: 100%;
        display: block; padding: 24px 24px 28px;
        background-size: 48px 48px;
    }
    .auth-logo { margin-bottom: 56px; }
    .auth-logo b { font-size: 16px; }
    .auth-mark { width: 40px; height: 40px; }

    .ring-1 { width: 240px; height: 240px; top: -100px; right: -100px; }
    .ring-2 { width: 140px; height: 140px; top:  -50px; right:  -50px; }
    .ring-dot { width: 12px; height: 12px; top: 99px; right: 99px; }

    .auth-word { gap: 12px; }
    .auth-sfx { font-size: 76px; }
    /* Низ плашки в макете на 5px выше низа букв; поворот добавляет свой вынос. */
    .auth-pill { font-size: 26px; padding: 8px 20px 12px; margin-bottom: 10px; }
    .auth-tag { font-size: 16px; margin-top: 20px; }

    /* Форма прижата к верху полосы, а не по центру экрана. */
    .auth-side {
        flex: 1; align-items: flex-start; justify-content: flex-start;
        padding: 28px 24px 32px;
    }
    .auth-form { width: 100%; }
    .auth-form h1 { font-size: 24px; }
    .auth-sub { font-size: 15px; margin: 8px 0 28px; }

    .field { gap: 8px; margin-bottom: 18px; }
    /* 44px — минимальная площадь для пальца. */
    .auth-check { min-height: 44px; margin: 0 0 18px; }
    .auth-btn { height: 56px; }
    /* На телефоне разделителя в макете нет. */
    .auth-foot { margin-top: 28px; padding-top: 0; border-top: 0; }
}
