.login-auth-form {
  display: grid;
  gap: 16px;
}

.auth-mode-switch,
.phone-auth-kind {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
}

.auth-mode-switch button,
.phone-auth-kind button {
  min-width: 0;
  min-height: 36px;
  border: 0;
  border-radius: 4px;
  color: var(--ink-soft);
  background: transparent;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.auth-mode-switch button[aria-selected="true"],
.phone-auth-kind button[aria-selected="true"] {
  color: var(--surface);
  background: var(--ink);
}

.phone-input {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: stretch;
}

.phone-input b {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 6px 0 0 6px;
  color: var(--ink-soft);
  background: var(--surface-muted);
  font-weight: 650;
}

.phone-input input {
  min-width: 0;
  border-radius: 0 6px 6px 0;
}

.phone-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 10px;
  align-items: end;
}

.phone-code-row .button {
  min-width: 0;
}

.phone-consent {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.phone-consent legend {
  padding: 0;
  color: var(--ink);
  font-weight: 700;
}

.phone-consent label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: var(--ink-soft);
  line-height: 1.5;
}

.phone-consent input {
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
}

@media (max-width: 520px) {
  .phone-code-row {
    grid-template-columns: minmax(0, 1fr);
  }
}
