:root { color-scheme: dark; font-family: Inter, system-ui, sans-serif; }
* { box-sizing: border-box; }
body {
  min-height: 100vh; margin: 0; display: grid; place-items: center; padding: 24px;
  color: #f5f1e8; background: radial-gradient(circle at top, #21594d, #102d27 52%, #091b17);
}
.login-card {
  position: relative;
  width: min(100%, 430px); padding: 42px; border: 1px solid rgba(233,204,138,.25);
  border-radius: 22px; background: rgba(8,27,23,.88); box-shadow: 0 26px 80px rgba(0,0,0,.35);
}
/* Язык выбирают до входа, поэтому переключатель стоит на самой карточке —
   в углу напротив знака, чтобы не разрывать заголовок. Свои правила ему
   нужны потому, что страница входа не грузит общую таблицу стилей: без них
   кнопки подхватывали вид кнопки «Войти». */
.lang-switch {
  position: absolute; top: 20px; right: 20px; display: flex; gap: 2px; padding: 3px;
  border: 1px solid rgba(233,204,138,.28); border-radius: 11px; background: rgba(13,41,35,.92);
}
.lang-button {
  margin: 0; min-width: 44px; min-height: 40px; padding: 0 10px; border: 0; border-radius: 8px;
  color: #cdd9d4; background: transparent; font-size: 12px; font-weight: 700; letter-spacing: .04em;
}
.lang-button.is-active { color: #102d27; background: #e9cc8a; }
.brand > span {
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 16px;
  font: 700 34px Georgia, serif; color: #e9cc8a; background: #143e35;
}
.brand span span { font-size: 14px; vertical-align: top; }
.eyebrow { margin: 28px 0 8px; color: #e9cc8a; font-size: 11px; letter-spacing: .18em; }
h1 { margin: 0; font: 600 32px Georgia, serif; }
.subtitle { margin: 12px 0 28px; color: #b9c9c3; line-height: 1.55; }
form { display: grid; gap: 10px; }
label { margin-top: 6px; color: #d7e0dc; font-size: 13px; }
input {
  width: 100%; padding: 14px 15px; border: 1px solid #45675f; border-radius: 10px;
  color: #fff; background: #0d2923; font: inherit; outline: none;
}
input:focus { border-color: #e9cc8a; box-shadow: 0 0 0 3px rgba(233,204,138,.12); }
button {
  margin-top: 14px; padding: 14px; border: 0; border-radius: 10px; cursor: pointer;
  color: #102d27; background: #e9cc8a; font: inherit; font-size: 15px; font-weight: 700;
}
button:disabled { cursor: wait; opacity: .65; }
.error { min-height: 22px; margin: 16px 0 0; color: #ffaaa0; font-size: 14px; }
/* Формы входа переключаются атрибутом hidden, а `form` выше задан сеткой —
   без этого правила скрытая форма оставалась бы на экране. */
[hidden] { display: none !important; }
/* Вход по номеру (ТЗ 09.10, М-05): «Отправить ещё раз», «Другой номер» и
   переключатель способа входа — тихие ссылки, а не вторая золотая кнопка.
   Высота — под палец, как у переключателя языка. */
.login-link {
  margin: 0; padding: 0; min-height: 44px; border: 0; border-radius: 0; color: #e9cc8a;
  background: none; font-size: 14px; font-weight: 600; text-align: left;
  text-decoration: underline; text-underline-offset: 3px;
}
.login-link:disabled { cursor: default; opacity: 1; color: #b9c9c3; text-decoration: none; }
.login-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 16px; margin-top: 4px; }
#mode-switch { display: block; margin-top: 4px; }
/* Подсказка «на экран телефона» (T-451): тихая строка под формой, отделена
   линией, чтобы не читалась как часть входа. */
.install-hint { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(233,204,138,.16); }
.install-hint p { margin: 0; color: #b9c9c3; font-size: 13px; line-height: 1.55; }
.install-hint .login-link { display: block; margin-top: 2px; }
@media (max-width: 520px) {
  .login-card { padding: 30px 24px; }
  .lang-switch { top: 16px; right: 16px; }
}

/* Отклик кнопки входа (busy.js). Экран входа не грузит style.css, поэтому
   здесь — короткая копия общих правил: спиннер цветом подписи, ширина та же. */
button:not(:disabled):active { transform: scale(.97); }
.rm-lock { cursor: progress; }
.rm-rel { position: relative; }
.rm-busy, .rm-done { -webkit-text-fill-color: transparent !important; }
.rm-busy > *, .rm-done > * { visibility: hidden; }
.rm-busy::after, .rm-done::after { content: ""; position: absolute; inset: 0; margin: auto; box-sizing: border-box;
  width: var(--rm-spin, 16px); height: var(--rm-spin, 16px); pointer-events: none; }
.rm-busy::after { border-radius: 50%; border: 2px solid color-mix(in srgb, currentColor 26%, transparent);
  border-top-color: currentColor; animation: rm-spin .7s linear infinite; }
.rm-done::after { width: calc(var(--rm-spin, 16px) * .42); height: calc(var(--rm-spin, 16px) * .78);
  border: solid currentColor; border-width: 0 2.5px 2.5px 0; transform: translateY(-12%) rotate(45deg); }
@keyframes rm-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { button:active { transform: none; } }
