/* Единая страница входа: вход, регистрация, восстановление. */

:root {
  --ink: #101215;
  --panel: #14171B;
  --panel-2: #1A1E23;
  --line: #23262B;
  --line-2: #2E3238;
  --text: #EDEBE8;
  --muted: #8A9099;
  --faint: #6E757E;
  --accent: #FF8001;
  --ok: #4FC98A;
  --err: #FF6B4A;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--text);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
}
.top img { height: 26px; display: block; }
.top .back { margin-left: auto; font-size: 14px; color: var(--muted); }
.top .back:hover { color: var(--accent); text-decoration: none; }

.center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px 64px;
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 30px 28px;
}

h1 {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -.02em;
  margin: 0 0 4px;
}
.sub { margin: 0 0 22px; font-size: 14px; color: var(--muted); line-height: 1.5; }

/* Вкладки */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 3px;
}
.tabs button {
  flex: 1;
  height: 38px;
  border: none;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.tabs button.active { background: var(--panel-2); color: var(--text); }

label { display: block; margin-top: 15px; font-size: 13px; color: var(--muted); }
label:first-of-type { margin-top: 0; }

input, select {
  margin-top: 7px;
  height: 46px;
  width: 100%;
  padding: 0 14px;
  background: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: 2px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
}
input:focus-visible, select:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.role-pick { display: flex; gap: 8px; margin-top: 7px; }
.role-pick button {
  flex: 1;
  height: 44px;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}
.role-pick button.on { border-color: var(--accent); color: var(--accent); background: rgba(255,128,1,.08); }

.primary {
  margin-top: 22px;
  height: 48px;
  width: 100%;
  border: none;
  border-radius: 2px;
  background: var(--accent);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.primary:hover { background: #FF9527; }
.primary:disabled { opacity: .55; cursor: default; }

.link-row { margin-top: 14px; text-align: center; }
.link-row button {
  background: transparent; border: none; color: var(--muted);
  font-family: inherit; font-size: 13px; cursor: pointer; padding: 0;
}
.link-row button:hover { color: var(--accent); }

.msg { margin-top: 16px; padding: 12px 14px; border: 1px solid currentColor; font-size: 14px; line-height: 1.5; }
.msg.ok { color: var(--ok); }
.msg.err { color: var(--err); }
.msg:empty { display: none; }

.hint { margin-top: 18px; font-size: 12px; color: var(--faint); line-height: 1.5; }
.consent { margin-top: 16px; font-size: 12px; color: var(--faint); line-height: 1.45; }
.consent a { color: var(--muted); }

.ff-note { font-size: 12.5px; color: var(--faint); line-height: 1.5; margin: 4px 0 14px; padding: 10px 12px; background: rgba(255,128,1,.06); border: 1px solid var(--line-2); border-radius: 3px; }

/* Узкие экраны: карточка во всю ширину, крупнее поля под палец.
   Медиазапросов здесь не было вовсе — на телефоне страница выглядела как
   уменьшенная десктопная. */
@media (max-width: 700px) {
  .top { padding: 14px 16px; }
  .center { padding: 20px 14px 48px; align-items: flex-start; }
  .card { max-width: none; padding: 22px 18px; border-radius: 14px; }
  .card h1 { font-size: 24px; }
  .tabs button { padding: 12px 10px; font-size: 15px; }
  input, select { height: 52px !important; font-size: 16px !important; }
  button.primary { height: 52px; font-size: 16px; }
  footer { padding: 22px 16px 32px !important; }
}
@media (max-width: 380px) {
  .card { padding: 18px 14px; }
  .card h1 { font-size: 21px; }
}
