/* Вход, регистрация, ввод кода — вариант A «Консоль» (CAL-283).
   Слева тёмная панель с подачей, справа форма; на телефоне форма первой. */

.auth {
  display: flex;
  min-height: calc(100vh - 64px);
  background: var(--c-bg);
  color: var(--c-text-1);
}

.auth-panel {
  flex: 0 0 46%;
  max-width: 600px;
  box-sizing: border-box;
  padding: 48px 56px;
  background: var(--c-topbar);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.auth-panel[hidden] { display: none; }
.auth-panel__eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: #5EEAD4;
}
.auth-panel__title {
  margin: 0; font-size: 38px; line-height: 1.12; font-weight: 700;
  letter-spacing: -.02em; overflow-wrap: anywhere;
}
.auth-panel__lead { margin: 0; font-size: 16px; line-height: 1.5; color: #CBD5E1; }
.auth-panel__intro { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }

.auth-sheet {
  margin-top: auto;
  border: 1px solid var(--c-topbar-line);
  border-radius: var(--r-panel);
  background: #0F172A;
  padding: 20px 22px;
  display: flex; flex-direction: column; gap: 4px;
  font-variant-numeric: tabular-nums;
}
.auth-sheet__head { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: #94A3B8; padding-bottom: 6px; }
.auth-sheet__row {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 14px; color: #E2E8F0; padding: 7px 0; border-bottom: 1px solid var(--c-topbar);
}
.auth-sheet__total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 8px; }
.auth-sheet__total span:first-child { font-size: 14px; color: #CBD5E1; }
.auth-sheet__total span:last-child { font-size: 26px; font-weight: 700; color: #5EEAD4; }

.auth-steps { margin: auto 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.auth-steps li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: #CBD5E1; }
.auth-steps__mark {
  flex: 0 0 28px; height: 28px; border-radius: var(--r-pill);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--c-topbar-line); font-size: 13px; font-weight: 600;
}
.auth-steps .is-done .auth-steps__mark { background: #0F172A; color: #5EEAD4; border-color: #0F766E; }
.auth-steps .is-current { color: #fff; font-weight: 600; }
.auth-steps .is-current .auth-steps__mark { background: var(--c-brand); color: var(--c-brand-ink); border-color: var(--c-brand); }

.auth-main {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 48px 24px;
}
.auth-form { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 20px; }
.auth-form__title { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.auth-form__sub { margin: 6px 0 0; font-size: 14px; color: var(--c-text-2); }
.auth-form__foot { font-size: 14px; color: var(--c-text-2); }

.auth-form a, .auth-link { color: #0F766E; text-decoration: underline; text-underline-offset: 2px; }
.auth-form a:hover, .auth-link:hover { color: var(--c-brand-ink); }

.auth-seg {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px;
  margin: 0; padding: 4px; border: 0; background: #E8EBEF; border-radius: var(--r-panel);
}
.auth-seg legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.auth-seg label { position: relative; display: block; }
.auth-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.auth-seg span {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 40px; padding: 4px 6px; box-sizing: border-box; border-radius: 6px;
  font-size: 13px; font-weight: 500; line-height: 1.2; color: #4B5563; cursor: pointer;
  transition: background var(--motion-fast), color var(--motion-fast);
}
.auth-seg input:checked + span { background: #fff; color: var(--c-text-1); font-weight: 600; box-shadow: 0 1px 2px rgba(15,23,42,.12); }
.auth-seg input:focus-visible + span { outline: 2px solid var(--c-brand); outline-offset: 1px; }

.auth-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; }
.auth-field__hint { font-size: 12px; font-weight: 400; color: var(--c-text-2); }
.auth-field__hint[hidden] { display: none; }
/* CAL-311: ошибка поля (промокод). #B91C1C на белом — 6.5:1, AA для 12px. */
.auth-field__hint--error { color: #B91C1C; font-weight: 500; }
.auth-input[aria-invalid="true"] { border-color: #B91C1C; }
.auth-input {
  width: 100%; box-sizing: border-box; height: 44px;
  border: 1px solid var(--c-input-border); border-radius: var(--r-control);
  padding: 0 12px; font: inherit; font-size: 15px; color: var(--c-text-1); background: #fff;
}
.auth-input:focus { outline: none; border-color: var(--c-brand); box-shadow: 0 0 0 3px rgba(20,184,166,.22); }
.auth-input--code { height: 56px; text-align: center; font-size: 24px; letter-spacing: .4em; font-variant-numeric: tabular-nums; }

.auth-checks { display: flex; flex-direction: column; gap: 10px; font-size: 13px; line-height: 1.45; color: #4B5563; }
.auth-checks label { display: flex; gap: 10px; align-items: flex-start; }
.auth-checks input { margin-top: 3px; accent-color: var(--c-brand); }

.auth-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 100%;
  min-height: 48px; border: 0; border-radius: var(--r-control);
  background: var(--c-brand); color: var(--c-brand-ink);
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.auth-btn:hover { filter: brightness(.95); }
.auth-btn--ghost { background: transparent; border: 1px solid var(--c-input-border); color: var(--c-text-1); font-weight: 500; min-height: 44px; font-size: 14px; }
.auth-btn--ghost:hover { background: #EEF1F4; filter: none; }
.auth-btn:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 2px; }

.auth-alert { border-radius: var(--r-panel); padding: 12px; font-size: 14px; border: 1px solid #FECACA; background: #FEF2F2; color: #7F1D1D; }
.auth-alert ul { margin: 0; padding-left: 18px; }
.auth-alert--ok { border-color: rgba(20,184,166,.4); background: rgba(20,184,166,.1); color: var(--c-brand-ink); }

@media (max-width: 900px) {
  .auth { flex-direction: column-reverse; min-height: 0; }
  .auth-panel { flex: none; max-width: none; padding: 32px 16px; gap: 20px; }
  .auth-panel__intro { margin-top: 0; }
  .auth-panel__title { font-size: 28px; }
  .auth-main { padding: 32px 16px; }
}
@media (max-width: 480px) {
  .auth-seg { grid-template-columns: minmax(0, 1fr); }
}
