/* Общие стили страниц входа и регистрации */
:root {
  --bg: #0f1115; --panel: #171a21; --panel-2: #1e222b; --line: #2a2f3a; --text: #e8eaed; --muted: #8b919c;
  --accent: #f0b90b; --buy: #20b26c; --sell: #ef454a; color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f5f6f8; --panel: #ffffff; --panel-2: #eef0f3; --line: #e1e4e8; --text: #121214; --muted: #6b7280; color-scheme: light;
}
* { box-sizing: border-box; }
/* Без сдвига шапки между страницами с прокруткой и без неё */
html { scrollbar-gutter: stable; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
button, input { font: inherit; color: inherit; }

.top { position: sticky; top: 0; z-index: 5; height: 56px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--page-inset, 20px); background: var(--panel); border-bottom: 1px solid var(--line); }
.logo { font-weight: 700; font-size: 18px; color: var(--text); }
.logo span { color: var(--accent); }
.theme { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; display: grid; place-items: center; }
.theme .sun { display: none; }
[data-theme="light"] .theme .sun { display: block; }
[data-theme="light"] .theme .moon { display: none; }

/* Общая ось с шапкой, одинаковые колонки для промо и формы. */
.auth { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: var(--page-width, 1200px);
  width: 100%; margin: 0 auto; padding: 56px var(--page-gutter, 20px); gap: clamp(24px, 4vw, 48px); align-items: start; align-content: start; }
.pitch { padding-top: 40px; }
.pitch h1 { font-size: 34px; line-height: 1.2; margin: 0 0 14px; }
.pitch p { color: var(--muted); font-size: 16px; margin: 0 0 24px; }
.pitch ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.pitch li { display: flex; gap: 10px; align-items: center; }
.pitch li span { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(240, 185, 11, .12); color: var(--accent); flex: none; }

.card { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 32px; width: 100%; }
.card h2 { margin: 0 0 6px; font-size: 24px; }
/* Своё имя класса: .sub в controls.css — строка подменю с фоном и линией */
.card .auth-sub { color: var(--muted); margin: 0 0 20px; }
.tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs button { border: 0; background: none; padding: 8px 0; cursor: pointer; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--text); border-color: var(--accent); }
label.lbl { display: block; color: var(--muted); font-size: 13px; margin: 14px 0 6px; }
.input { display: flex; align-items: center; height: 46px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; }
/* Заметное кольцо фокуса на всём поле: у самого input контур убран */
.input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.input.bad { border-color: var(--sell); }
.input.bad:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--sell) 30%, transparent); }
.input .eye:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: 6px; }
.input input { flex: 1; min-width: 0; height: 100%; padding: 0 12px; background: transparent; border: 0; outline: 0; }
.input select { flex: 1; min-width: 0; height: 100%; padding: 0 12px; background: transparent; border: 0; outline: 0; color: inherit; font: inherit; cursor: pointer; }
.input select option { background: var(--panel); color: var(--text); }
.input .pre { padding: 0 10px 0 12px; color: var(--muted); border-right: 1px solid var(--line); }
.input .eye { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 0 12px; }
.err { color: var(--sell); font-size: 12px; min-height: 16px; margin-top: 4px; }
.row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 13px; }
.check { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); font-size: 13px; margin-top: 14px; cursor: pointer; }
.check input { margin-top: 2px; }
.primary { width: 100%; height: 48px; margin-top: 18px; border: 0; border-radius: 8px; background: var(--accent-bg); color: #fff; font-weight: 600; cursor: pointer; }
.primary:disabled { opacity: .5; cursor: default; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 20px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.social { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.social button { height: 44px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; display: flex; gap: 8px; align-items: center; justify-content: center; }
.switch { text-align: center; margin-top: 20px; color: var(--muted); }
.rules { list-style: none; padding: 0; margin: 8px 0 0; font-size: 12px; color: var(--muted); display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.rules li::before { content: "○ "; }
.rules li.ok { color: var(--buy); }
.rules li.ok::before { content: "✓ "; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--line); padding: 10px 16px;
  border-radius: 8px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 20px; }

@media (max-width: 860px) {
  .auth { grid-template-columns: minmax(0, 1fr); max-width: 620px; padding-block: 24px; gap: 24px; }
  .pitch { display: none; }
  .card { padding: 24px; }
}
@media (max-width: 860px) {
  .input input { font-size: 16px; }
  .input { height: 48px; }
  .input .eye { align-self: stretch; min-width: 56px; }
  .tabs button { min-height: 40px; }
  .theme { width: 40px; height: 40px; }
  .row { flex-wrap: wrap; gap: 10px; }
  .row a { padding: 8px 0; }
  .switch a { display: inline-block; padding: 8px 4px; }
}
@media (max-width: 400px) {
  .auth { padding-block: 16px; }
  .card { padding: 18px 14px; }
  .rules { grid-template-columns: 1fr; }
}

/* ===== Светлая тема: цвета с достаточным контрастом на белом (от 4.5:1 для текста) ===== */
/* Заливки кнопок с белым текстом: контраст от 4.5:1 в обеих темах (текстовые --accent/--buy/--sell остаются ярче) */
  :root { --warn-strong: #ffb020; --accent-bg: #f0b90b; --buy-bg: #15803d; --sell-bg: #dc2626; }
[data-theme="light"] { --accent: #8f7114; --buy: #0b7a44; --sell: #d42f35; --muted: #596170; --warn-strong: #a15c07; }
[data-theme="light"] .ico.blue { color: var(--accent); }
[data-theme="light"] .ico.green { color: #0b7a44; }
[data-theme="light"] .ico.red { color: #d42f35; }
[data-theme="light"] .ico.amber { color: #b45309; }
[data-theme="light"] .ico.purple { color: var(--accent); }
[data-theme="light"] .login-strip b, [data-theme="light"] .strip-ico, [data-theme="light"] .notice .ico { color: var(--warn-strong); }
[data-theme="light"] .tag.warn { color: #a15c07; }
[data-theme="light"] .stars button { color: #8a919d; }
[data-theme="light"] .stars button.on { color: #f59e0b; }
[data-theme="light"] a.card:hover, [data-theme="light"] .guide:hover, [data-theme="light"] .news-card:hover,
[data-theme="light"] .lead-card:hover, [data-theme="light"] .card:hover { box-shadow: 0 10px 24px rgba(16, 24, 40, .08); }
[data-theme="light"] .side-switch, [data-theme="light"] .dd .menu { box-shadow: 0 8px 20px rgba(16, 24, 40, .10); }
[data-theme="light"] .support { box-shadow: 0 6px 16px rgba(240, 185, 11, .30); }

/* Заявка на ранний доступ (signup.html): поле-ловушка для ботов скрыто от людей и программ чтения экрана */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.done { text-align: center; padding: 24px 0 8px; outline: none; }
.done h2 { margin-bottom: 8px; }
.done-home { display: inline-grid; place-items: center; width: auto; padding: 0 24px; text-decoration: none; }
