/* Crypto Navigator: вход, регистрация, сброс пароля, подтверждение почты (auth.html).
   Поверх app.css (токены, кнопки, поля). Только логические свойства: страница работает и справа налево. */

body.auth { padding-bottom: 0; }
.au { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); }

/* ---------- левая колонка: шапка, форма, низ ---------- */
.au-main { display: flex; flex-direction: column; min-width: 0; padding: 14px 20px calc(18px + var(--safe-b)); }
.au-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.au-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); border-radius: 10px; }
.au-brand img { width: 38px; height: 31px; }
.au-brand b { font-family: var(--f-display); font-weight: 400; font-size: 17px; letter-spacing: .01em; white-space: nowrap; }
.au-brand:focus-visible, .au-link:focus-visible, .au-switch a:focus-visible { outline: 2px solid var(--bull); outline-offset: 3px; }

/* язык: обычный select — понятен на телефоне и читалке экрана */
.lang-sel { position: relative; display: inline-flex; align-items: center; }
.lang-sel svg { position: absolute; inset-inline-start: 10px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.lang-sel select {
  width: auto; height: 40px; padding-block: 0; padding-inline: 32px 12px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--panel-2); border-color: var(--line-2); color: var(--text); cursor: pointer;
}
.lang-sel select:focus-visible { outline: 2px solid var(--bull); outline-offset: 2px; }

.au-body { flex: 1; display: grid; place-items: center; padding: 28px 0 32px; }
.au-card { width: min(400px, 100%); }
.au-card h1 { font-family: var(--f-display); font-size: clamp(28px, 7vw, 34px); line-height: 1.12; text-wrap: balance; }
.au-sub { margin: 10px 0 24px; color: var(--muted); font-size: 15.5px; line-height: 1.5; text-wrap: pretty; }

/* Telegram Login Widget + разделитель */
.au-tg { display: flex; flex-direction: column; align-items: stretch; gap: 18px; margin-bottom: 18px; }
.au-tg[hidden] { display: none; }
.au-tg-slot { display: flex; justify-content: center; min-height: 40px; }
.au-or { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 13px; }
.au-or::before, .au-or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }

/* ---------- поля ---------- */
.au-form { display: grid; gap: 16px; }
.au-field label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 600; color: var(--text); }
.au-lbl { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.au-lbl label { margin: 0; }
.au-link { display: inline-block; padding-block: 4px; font-size: 14px; font-weight: 600; color: var(--bull); border-radius: 6px; }
.au-field input { height: 52px; padding-block: 0; padding-inline: 14px; border-radius: var(--r-m); background: var(--ink-2); }
.au-field input::placeholder { color: #6f7988; }
.au-field input:focus-visible { border-color: var(--bull); box-shadow: 0 0 0 3px rgba(168, 232, 48, .18); }
.au-field.bad input { border-color: #ff5a5f; }
.au-field.bad input:focus-visible { box-shadow: 0 0 0 3px rgba(255, 90, 95, .2); }
.au-hint, .au-err { margin: 7px 0 0; font-size: 13.5px; line-height: 1.4; }
.au-hint { color: var(--muted); }
.au-err { color: #ff7a7e; font-weight: 600; }
.au-field.bad .au-hint { display: none; }
.au-caps { color: var(--gold); font-weight: 600; }

.pw { position: relative; }
.pw input { padding-inline-end: 52px; }
.pw-eye {
  position: absolute; inset-block: 4px; inset-inline-end: 4px; width: 44px; display: grid; place-items: center;
  border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer;
}
.pw-eye svg { width: 20px; height: 20px; }
.pw-eye:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.pw-eye:focus-visible { outline: 2px solid var(--bull); outline-offset: -2px; color: var(--text); }
.pw-eye .off, .pw-eye[aria-pressed="true"] .on { display: none; }
.pw-eye[aria-pressed="true"] .off { display: block; }

/* ошибка формы от сервера */
.au-alert {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-m);
  background: rgba(240, 16, 24, .1); border: 1px solid rgba(255, 90, 95, .35); color: #ffd3d4; font-size: 14px; line-height: 1.45;
}
.au-alert[hidden] { display: none; }
.au-alert svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: #ff7a7e; }

.au-submit { width: 100%; min-height: 52px; font-size: 16px; border-radius: var(--r-m); }
.au-submit:focus-visible { outline: 2px solid var(--bull); outline-offset: 3px; }
.au-submit[aria-busy="true"] { cursor: progress; opacity: .85; }
.spin {
  width: 18px; height: 18px; flex: none; border-radius: 50%;
  border: 2.5px solid rgba(12, 20, 4, .25); border-top-color: var(--bull-ink); animation: spin 700ms linear infinite;
}
.spin[hidden] { display: none; }

.au-switch { margin: 22px 0 0; text-align: center; color: var(--muted); font-size: 15px; }
.au-switch a { font-weight: 700; border-radius: 6px; }
.au-legal { margin: 14px 0 0; text-align: center; color: var(--dim); font-size: 12.5px; line-height: 1.5; }

/* ---------- состояния: письмо отправлено, почта подтверждена, ссылка не сработала ---------- */
.au-state { text-align: center; }
.au-state[hidden] { display: none; }
.au-state .ico { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 20px; }
.au-state .ico svg { width: 30px; height: 30px; }
.au-state h1 { margin-bottom: 10px; }
.au-state p { margin: 0 auto 22px; max-width: 34ch; color: var(--muted); line-height: 1.5; }
.au-state .btn { min-height: 52px; padding-inline: 24px; }
.au-state .loader { margin: 8px auto 18px; }
.au-state .au-mascot { width: 150px; margin: 0 auto 6px; }

.au-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; color: var(--dim); font-size: 12.5px; }
.au-foot a { color: var(--muted); }

/* ---------- правая колонка: бренд (только на широком экране) ---------- */
.au-side { display: none; }
@media (min-width: 960px) {
  .au { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
  .au-main { padding: 22px 40px 22px; }
  .au-side {
    position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 22px;
    padding: 48px clamp(32px, 4vw, 64px); border-inline-start: 1px solid var(--line);
    background: radial-gradient(70% 55% at 60% 30%, rgba(168, 232, 48, .14), transparent 70%), var(--ink-2);
  }
  .au-side img { width: min(340px, 80%); margin-inline: auto; filter: drop-shadow(0 30px 50px rgba(0, 0, 0, .55)); }
  .au-side h2 { font-family: var(--f-display); font-size: clamp(24px, 2.4vw, 32px); line-height: 1.15; max-width: 16ch; text-wrap: balance; }
  .au-side ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
  .au-side li { display: flex; gap: 10px; align-items: flex-start; color: #c3cad6; font-size: 15.5px; line-height: 1.45; }
  .au-side li svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--bull); }
}

@media (max-width: 420px) {
  .au-main { padding-inline: 16px; }
  .au-brand b { font-size: 15.5px; }
  .au-body { place-items: start center; padding-top: 22px; }
}

/* ---------- арабский: шрифт с арабскими буквами, без «рисованного» Russo One ---------- */
[dir="rtl"] .au-card h1, [dir="rtl"] .au-side h2 { letter-spacing: 0; line-height: 1.3; }
[dir="rtl"] .au-brand b { font-family: "Russo One", "Onest", sans-serif; font-weight: 400; }   /* название — латиницей, как в логотипе */
[dir="rtl"] .au-field input[type="email"], [dir="rtl"] .au-field input[type="password"], [dir="rtl"] .au-field input[type="text"] {
  direction: ltr; text-align: right;        /* адрес и пароль — латиница: курсор и порядок символов слева направо */
}

/* ловушка для ботов: за пределами экрана, не display:none (такие поля боты пропускают) */
.au-hp { position: absolute; inset-inline-start: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.au-ts { min-height: 65px; }
.au-ts[hidden] { display: none; }
.au-gift { margin: 0; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; color: var(--muted);
  background: rgba(255, 216, 77, .07); border: 1px solid rgba(255, 216, 77, .3); }
