/* ---------- Страница входа ---------- */
body.auth-page {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 32px 16px;
  background:
    radial-gradient(720px 420px at 50% -8%, rgb(246 42 42 / .14), transparent 70%),
    var(--color-bg);
}

.auth {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: auth-in .3s cubic-bezier(0, 0, .2, 1) backwards;
}
@keyframes auth-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.auth-logo { height: 40px; width: auto; -webkit-user-drag: none; }

.auth-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 16px;
  border-radius: 14px;
  background: var(--color-surface);
  box-shadow: 0 0 0 1px var(--color-border), 0 24px 60px rgb(0 0 0 / .45);
}

/* Вкладки: красная плашка переезжает к выбранной */
.auth-tabs {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  height: 44px;
  padding: 4px;
  border-radius: 10px;
  background: var(--color-control);
}
.auth-tabs-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 7px;
  background: var(--color-accent);
  transition: transform .35s cubic-bezier(.22, 1, .36, 1);
}
.auth-tabs.register .auth-tabs-indicator { transform: translateX(100%); }
.auth-tabs button {
  position: relative;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-muted);
  cursor: pointer;
  transition: color .2s;
}
.auth-tabs button:hover { color: rgb(255 255 255 / .8); }
.auth-tabs button[aria-selected="true"] { color: #fff; }
.auth-tabs button:focus-visible { box-shadow: inset 0 0 0 2px rgb(255 255 255 / .5); }

.auth-panel { display: flex; flex-direction: column; gap: 16px; animation: fade-in .2s cubic-bezier(0, 0, .2, 1); }
.auth-panel[hidden] { display: none; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.auth-head { padding: 0 2px; }
.auth-head h1 { font-size: 22px; line-height: 1.2; font-weight: 700; }
.auth-head p { margin-top: 6px; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--color-muted); }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form .btn-lg { margin-top: 4px; }

.pass-toggle {
  width: 30px;
  height: 30px;
  margin-right: -6px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--color-muted);
  cursor: pointer;
  transition: color .15s, background-color .15s;
}
.pass-toggle:hover { color: var(--color-text); background: rgb(255 255 255 / .06); }
.pass-toggle:focus-visible { box-shadow: inset 0 0 0 2px rgb(246 42 42 / .5); }
.pass-toggle .eye-off,
.pass-toggle[aria-pressed="true"] .eye { display: none; }
.pass-toggle[aria-pressed="true"] .eye-off { display: block; }

.auth-hint { font-size: 12px; font-weight: 600; color: var(--color-muted); text-align: center; }
.auth-hint b { color: rgb(255 255 255 / .8); font-weight: 700; }

/* Шаги регистрации */
.reg-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  border-radius: 10px;
  background: var(--color-bg);
}
.reg-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px;
  font-size: 13px;
  line-height: 20px;
  font-weight: 600;
  color: rgb(255 255 255 / .75);
}
.reg-steps li > b {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--color-control);
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text);
}
.reg-steps strong { color: var(--color-text); font-weight: 700; }
.reg-steps em { font-style: normal; color: var(--color-text); }
.cmd {
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--color-control);
  font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  cursor: copy;
  transition: background-color .15s;
}
.cmd:hover { background: rgb(255 255 255 / .12); }
.cmd:focus-visible { box-shadow: 0 0 0 2px rgb(246 42 42 / .5); }

a.btn { text-decoration: none; }

/* Узкие телефоны: длинные подписи вкладок должны влезть */
@media (max-width: 400px) {
  body.auth-page { padding: 24px 12px; }
  .auth-card { padding: 12px; }
  .auth-tabs button { padding: 0 4px; font-size: 12px; line-height: 1.15; }
}
